aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/hp680_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/hp680_bl.c')
-rw-r--r--drivers/video/backlight/hp680_bl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c
index e7444c8f289d..0899fccbd570 100644
--- a/drivers/video/backlight/hp680_bl.c
+++ b/drivers/video/backlight/hp680_bl.c
@@ -33,11 +33,11 @@ static void hp680bl_send_intensity(struct backlight_device *bd)
33{ 33{
34 unsigned long flags; 34 unsigned long flags;
35 u16 v; 35 u16 v;
36 int intensity = bd->props->brightness; 36 int intensity = bd->props.brightness;
37 37
38 if (bd->props->power != FB_BLANK_UNBLANK) 38 if (bd->props.power != FB_BLANK_UNBLANK)
39 intensity = 0; 39 intensity = 0;
40 if (bd->props->fb_blank != FB_BLANK_UNBLANK) 40 if (bd->props.fb_blank != FB_BLANK_UNBLANK)
41 intensity = 0; 41 intensity = 0;
42 if (hp680bl_suspended) 42 if (hp680bl_suspended)
43 intensity = 0; 43 intensity = 0;
@@ -98,8 +98,7 @@ static int hp680bl_get_intensity(struct backlight_device *bd)
98 return current_intensity; 98 return current_intensity;
99} 99}
100 100
101static struct backlight_properties hp680bl_data = { 101static struct backlight_ops hp680bl_ops = {
102 .max_brightness = HP680_MAX_INTENSITY,
103 .get_brightness = hp680bl_get_intensity, 102 .get_brightness = hp680bl_get_intensity,
104 .update_status = hp680bl_set_intensity, 103 .update_status = hp680bl_set_intensity,
105}; 104};
@@ -109,13 +108,14 @@ static int __init hp680bl_probe(struct platform_device *pdev)
109 struct backlight_device *bd; 108 struct backlight_device *bd;
110 109
111 bd = backlight_device_register ("hp680-bl", &pdev->dev, NULL, 110 bd = backlight_device_register ("hp680-bl", &pdev->dev, NULL,
112 &hp680bl_data); 111 &hp680bl_ops);
113 if (IS_ERR(bd)) 112 if (IS_ERR(bd))
114 return PTR_ERR(bd); 113 return PTR_ERR(bd);
115 114
116 platform_set_drvdata(pdev, bd); 115 platform_set_drvdata(pdev, bd);
117 116
118 bd->props->brightness = HP680_DEFAULT_INTENSITY; 117 bd->props.max_brightness = HP680_MAX_INTENSITY;
118 bd->props.brightness = HP680_DEFAULT_INTENSITY;
119 hp680bl_send_intensity(bd); 119 hp680bl_send_intensity(bd);
120 120
121 return 0; 121 return 0;