]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/video/backlight/corgi_lcd.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / drivers / video / backlight / corgi_lcd.c
index b4bcf8043797d18ced2ab1618ee9ef57853e6399..1e71c35083bb4ca8505031efeee5db036a2a2c51 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/lcd.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/corgi_lcd.h>
+#include <linux/slab.h>
 #include <asm/mach/sharpsl_param.h>
 
 #define POWER_IS_ON(pwr)       ((pwr) <= FB_BLANK_NORMAL)
@@ -533,6 +534,7 @@ err_free_backlight_on:
 
 static int __devinit corgi_lcd_probe(struct spi_device *spi)
 {
+       struct backlight_properties props;
        struct corgi_lcd_platform_data *pdata = spi->dev.platform_data;
        struct corgi_lcd *lcd;
        int ret = 0;
@@ -559,13 +561,14 @@ static int __devinit corgi_lcd_probe(struct spi_device *spi)
        lcd->power = FB_BLANK_POWERDOWN;
        lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA;
 
-       lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev,
-                                       lcd, &corgi_bl_ops);
+       memset(&props, 0, sizeof(struct backlight_properties));
+       props.max_brightness = pdata->max_intensity;
+       lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev, lcd,
+                                               &corgi_bl_ops, &props);
        if (IS_ERR(lcd->bl_dev)) {
                ret = PTR_ERR(lcd->bl_dev);
                goto err_unregister_lcd;
        }
-       lcd->bl_dev->props.max_brightness = pdata->max_intensity;
        lcd->bl_dev->props.brightness = pdata->default_intensity;
        lcd->bl_dev->props.power = FB_BLANK_UNBLANK;