Skip to content

Commit

Permalink
sh_mobile_lcdc: Add an lcdc channel pointer to sh_mobile_lcdc_entity
Browse files Browse the repository at this point in the history
The field will be used by the transmitter drivers to access
sh_mobile_lcdc_chan fields such as fb_info.

Signed-off-by: Laurent Pinchart <[email protected]>
  • Loading branch information
pinchartl committed Mar 12, 2012
1 parent afaad83 commit e34d0bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1495,8 +1495,10 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
if (!info || !info->device)
continue;

if (ch->tx_dev)
if (ch->tx_dev) {
ch->tx_dev->lcdc = NULL;
module_put(ch->cfg.tx_dev->dev.driver->owner);
}

if (ch->sglist)
vfree(ch->sglist);
Expand Down Expand Up @@ -1605,6 +1607,7 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
return -EINVAL;
}
ch->tx_dev = platform_get_drvdata(cfg->tx_dev);
ch->tx_dev->lcdc = ch;
}

/* Iterate through the modes to validate them and find the highest
Expand Down
2 changes: 2 additions & 0 deletions drivers/video/sh_mobile_lcdcfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct fb_info;
struct module;
struct sh_mobile_lcdc_entity;
struct sh_mobile_lcdc_priv;
struct sh_mobile_lcdc_chan;

struct sh_mobile_lcdc_entity_ops {
/* Display */
Expand All @@ -30,6 +31,7 @@ struct sh_mobile_lcdc_entity_ops {
struct sh_mobile_lcdc_entity {
struct module *owner;
const struct sh_mobile_lcdc_entity_ops *ops;
struct sh_mobile_lcdc_chan *lcdc;
};

/*
Expand Down

0 comments on commit e34d0bb

Please sign in to comment.