backlight: give platform_lcd the same name as the platform device.
authorBen Dooks <ben-linux@fluff.org>
Wed, 30 Jul 2008 05:32:56 +0000 (22:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Jul 2008 16:41:43 +0000 (09:41 -0700)
When registering an platform_lcd, use the name of the platform device
specified in case there are more than one platform_lcd backlights
registered.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/backlight/platform_lcd.c

index 72d44dbfce826121ea1704f48ba91f3586841d9b..29d7121e32759a693e625853b9453f24814ef851 100644 (file)
@@ -92,7 +92,7 @@ static int __devinit platform_lcd_probe(struct platform_device *pdev)
 
        plcd->us = dev;
        plcd->pdata = pdata;
-       plcd->lcd = lcd_device_register("platform-lcd", dev,
+       plcd->lcd = lcd_device_register(dev_name(dev), dev,
                                        plcd, &platform_lcd_ops);
        if (IS_ERR(plcd->lcd)) {
                dev_err(dev, "cannot register lcd device\n");