diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/backlight/hp680_bl.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/backlight/hp680_bl.c')
-rw-r--r-- | drivers/video/backlight/hp680_bl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c index 7fb4eefff80d..267d23f8d645 100644 --- a/drivers/video/backlight/hp680_bl.c +++ b/drivers/video/backlight/hp680_bl.c | |||
@@ -98,23 +98,25 @@ static int hp680bl_get_intensity(struct backlight_device *bd) | |||
98 | return current_intensity; | 98 | return current_intensity; |
99 | } | 99 | } |
100 | 100 | ||
101 | static struct backlight_ops hp680bl_ops = { | 101 | static const struct backlight_ops hp680bl_ops = { |
102 | .get_brightness = hp680bl_get_intensity, | 102 | .get_brightness = hp680bl_get_intensity, |
103 | .update_status = hp680bl_set_intensity, | 103 | .update_status = hp680bl_set_intensity, |
104 | }; | 104 | }; |
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 | ||