Commit e34d0bbb authored by Laurent Pinchart's avatar Laurent Pinchart

sh_mobile_lcdc: Add an lcdc channel pointer to sh_mobile_lcdc_entity

The field will be used by the transmitter drivers to access
sh_mobile_lcdc_chan fields such as fb_info.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent afaad83b
...@@ -1495,8 +1495,10 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev) ...@@ -1495,8 +1495,10 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
if (!info || !info->device) if (!info || !info->device)
continue; continue;
if (ch->tx_dev) if (ch->tx_dev) {
ch->tx_dev->lcdc = NULL;
module_put(ch->cfg.tx_dev->dev.driver->owner); module_put(ch->cfg.tx_dev->dev.driver->owner);
}
if (ch->sglist) if (ch->sglist)
vfree(ch->sglist); vfree(ch->sglist);
...@@ -1605,6 +1607,7 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv, ...@@ -1605,6 +1607,7 @@ sh_mobile_lcdc_channel_init(struct sh_mobile_lcdc_priv *priv,
return -EINVAL; return -EINVAL;
} }
ch->tx_dev = platform_get_drvdata(cfg->tx_dev); 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 /* Iterate through the modes to validate them and find the highest
......
...@@ -19,6 +19,7 @@ struct fb_info; ...@@ -19,6 +19,7 @@ struct fb_info;
struct module; struct module;
struct sh_mobile_lcdc_entity; struct sh_mobile_lcdc_entity;
struct sh_mobile_lcdc_priv; struct sh_mobile_lcdc_priv;
struct sh_mobile_lcdc_chan;
struct sh_mobile_lcdc_entity_ops { struct sh_mobile_lcdc_entity_ops {
/* Display */ /* Display */
...@@ -30,6 +31,7 @@ struct sh_mobile_lcdc_entity_ops { ...@@ -30,6 +31,7 @@ struct sh_mobile_lcdc_entity_ops {
struct sh_mobile_lcdc_entity { struct sh_mobile_lcdc_entity {
struct module *owner; struct module *owner;
const struct sh_mobile_lcdc_entity_ops *ops; const struct sh_mobile_lcdc_entity_ops *ops;
struct sh_mobile_lcdc_chan *lcdc;
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment