diff options
Diffstat (limited to 'drivers/video/backlight/locomolcd.c')
-rw-r--r-- | drivers/video/backlight/locomolcd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index fc812d96c31d..d1312477813e 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c | |||
@@ -112,11 +112,11 @@ static int current_intensity; | |||
112 | 112 | ||
113 | static int locomolcd_set_intensity(struct backlight_device *bd) | 113 | static int locomolcd_set_intensity(struct backlight_device *bd) |
114 | { | 114 | { |
115 | int intensity = bd->props->brightness; | 115 | int intensity = bd->props.brightness; |
116 | 116 | ||
117 | if (bd->props->power != FB_BLANK_UNBLANK) | 117 | if (bd->props.power != FB_BLANK_UNBLANK) |
118 | intensity = 0; | 118 | intensity = 0; |
119 | if (bd->props->fb_blank != FB_BLANK_UNBLANK) | 119 | if (bd->props.fb_blank != FB_BLANK_UNBLANK) |
120 | intensity = 0; | 120 | intensity = 0; |
121 | if (locomolcd_flags & LOCOMOLCD_SUSPENDED) | 121 | if (locomolcd_flags & LOCOMOLCD_SUSPENDED) |
122 | intensity = 0; | 122 | intensity = 0; |
@@ -141,11 +141,9 @@ static int locomolcd_get_intensity(struct backlight_device *bd) | |||
141 | return current_intensity; | 141 | return current_intensity; |
142 | } | 142 | } |
143 | 143 | ||
144 | static struct backlight_properties locomobl_data = { | 144 | static struct backlight_ops locomobl_data = { |
145 | .owner = THIS_MODULE, | ||
146 | .get_brightness = locomolcd_get_intensity, | 145 | .get_brightness = locomolcd_get_intensity, |
147 | .update_status = locomolcd_set_intensity, | 146 | .update_status = locomolcd_set_intensity, |
148 | .max_brightness = 4, | ||
149 | }; | 147 | }; |
150 | 148 | ||
151 | #ifdef CONFIG_PM | 149 | #ifdef CONFIG_PM |
@@ -190,7 +188,8 @@ static int locomolcd_probe(struct locomo_dev *ldev) | |||
190 | return PTR_ERR (locomolcd_bl_device); | 188 | return PTR_ERR (locomolcd_bl_device); |
191 | 189 | ||
192 | /* Set up frontlight so that screen is readable */ | 190 | /* Set up frontlight so that screen is readable */ |
193 | locomobl_data.brightness = 2; | 191 | locomolcd_bl_device->props.max_brightness = 4, |
192 | locomolcd_bl_device->props.brightness = 2; | ||
194 | locomolcd_set_intensity(locomolcd_bl_device); | 193 | locomolcd_set_intensity(locomolcd_bl_device); |
195 | 194 | ||
196 | return 0; | 195 | return 0; |