sh_mobile_lcdc: Add an lcdc channel pointer to sh_mobile_lcdc_entity
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 18 Sep 2011 10:21:17 +0000 (12:21 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 12 Mar 2012 21:40:50 +0000 (22:40 +0100)
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 <laurent.pinchart@ideasonboard.com>
drivers/video/sh_mobile_lcdcfb.c
drivers/video/sh_mobile_lcdcfb.h

index 9e44988155a47a3ba023d31e4e5a050a46165186..1ecc71ec41ff30d4858c4fb1c2ace8d1f9e7db84 100644 (file)
@@ -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);
@@ -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
index 9601b929a40c28421277b7f7801feb9d0e066e48..36cd5649598b97d5312a4e8bfb482ec90977cb2e 100644 (file)
@@ -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 */
@@ -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;
 };
 
 /*
This page took 0.034555 seconds and 5 git commands to generate.