]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
lcd: add lcd_device to check_fb() entry in lcd_ops
authorBen Dooks <ben-linux@fluff.org>
Thu, 24 Jul 2008 04:31:38 +0000 (21:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:40 +0000 (10:47 -0700)
Add the lcd_device being checked to the check_fb entry of lcd_ops.  This
ensures that any driver using this to check against it's own state can do
so, and also makes all the calls in lcd_ops more orthogonal in their
arguments.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/backlight/lcd.c
drivers/video/bf54x-lq043fb.c
drivers/video/bfin-t350mcqb-fb.c
include/linux/lcd.h

index 299fd318dd45828a4466d982069b69f221b27b5a..b15b2b84a6f7c951e809391f1cae019a4584af1e 100644 (file)
@@ -33,7 +33,7 @@ static int fb_notifier_callback(struct notifier_block *self,
        ld = container_of(self, struct lcd_device, fb_notif);
        mutex_lock(&ld->ops_lock);
        if (ld->ops)
-               if (!ld->ops->check_fb || ld->ops->check_fb(evdata->info))
+               if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info))
                        ld->ops->set_power(ld, *(int *)evdata->data);
        mutex_unlock(&ld->ops_lock);
        return 0;
index 49834a67a623351e3f27b5add2e1e2bbf6f114e9..940467aed13f27864849db15ba36b70e4ad2b846 100644 (file)
@@ -478,7 +478,7 @@ static int bfin_lcd_set_contrast(struct lcd_device *dev, int contrast)
        return 0;
 }
 
-static int bfin_lcd_check_fb(struct fb_info *fi)
+static int bfin_lcd_check_fb(struct lcd_device *dev, struct fb_info *fi)
 {
        if (!fi || (fi == &bfin_bf54x_fb))
                return 1;
index 135d6dd7e6729ded15706dcc16a2f78a68086e5e..7d1b819e501c780f4e9ddc1929ac8d155d633148 100644 (file)
@@ -396,7 +396,7 @@ static int bfin_lcd_set_contrast(struct lcd_device *dev, int contrast)
        return 0;
 }
 
-static int bfin_lcd_check_fb(struct fb_info *fi)
+static int bfin_lcd_check_fb(struct lcd_device *dev, struct fb_info *fi)
 {
        if (!fi || (fi == &bfin_t350mcqb_fb))
                return 1;
index 1d379787f2e78e4a1b56cb35c448e8e84ff39f38..173febac6656c20eaec69a8a03dc5fe53d9d9759 100644 (file)
@@ -47,7 +47,7 @@ struct lcd_ops {
         int (*set_contrast)(struct lcd_device *, int contrast);
        /* Check if given framebuffer device is the one LCD is bound to;
           return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */
-       int (*check_fb)(struct fb_info *);
+       int (*check_fb)(struct lcd_device *, struct fb_info *);
 };
 
 struct lcd_device {