diff options
Diffstat (limited to 'drivers/video/backlight/hp680_bl.c')
-rw-r--r-- | drivers/video/backlight/hp680_bl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c index f7cc528d5be7..267d23f8d645 100644 --- a/drivers/video/backlight/hp680_bl.c +++ b/drivers/video/backlight/hp680_bl.c | |||
@@ -105,16 +105,18 @@ static const struct backlight_ops hp680bl_ops = { | |||
105 | 105 | ||
106 | static int __devinit hp680bl_probe(struct platform_device *pdev) | 106 | static int __devinit hp680bl_probe(struct platform_device *pdev) |
107 | { | 107 | { |
108 | struct backlight_properties props; | ||
108 | struct backlight_device *bd; | 109 | struct backlight_device *bd; |
109 | 110 | ||
110 | bd = backlight_device_register ("hp680-bl", &pdev->dev, NULL, | 111 | memset(&props, 0, sizeof(struct backlight_properties)); |
111 | &hp680bl_ops); | 112 | props.max_brightness = HP680_MAX_INTENSITY; |
113 | bd = backlight_device_register("hp680-bl", &pdev->dev, NULL, | ||
114 | &hp680bl_ops, &props); | ||
112 | if (IS_ERR(bd)) | 115 | if (IS_ERR(bd)) |
113 | return PTR_ERR(bd); | 116 | return PTR_ERR(bd); |
114 | 117 | ||
115 | platform_set_drvdata(pdev, bd); | 118 | platform_set_drvdata(pdev, bd); |
116 | 119 | ||
117 | bd->props.max_brightness = HP680_MAX_INTENSITY; | ||
118 | bd->props.brightness = HP680_DEFAULT_INTENSITY; | 120 | bd->props.brightness = HP680_DEFAULT_INTENSITY; |
119 | hp680bl_send_intensity(bd); | 121 | hp680bl_send_intensity(bd); |
120 | 122 | ||