diff options
Diffstat (limited to 'drivers/video/riva/fbdev.c')
-rw-r--r-- | drivers/video/riva/fbdev.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index 3a75def01b28..f8a3d608b208 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -308,11 +308,11 @@ static int riva_bl_update_status(struct backlight_device *bd) | |||
308 | U032 tmp_pcrt, tmp_pmc; | 308 | U032 tmp_pcrt, tmp_pmc; |
309 | int level; | 309 | int level; |
310 | 310 | ||
311 | if (bd->props->power != FB_BLANK_UNBLANK || | 311 | if (bd->props.power != FB_BLANK_UNBLANK || |
312 | bd->props->fb_blank != FB_BLANK_UNBLANK) | 312 | bd->props.fb_blank != FB_BLANK_UNBLANK) |
313 | level = 0; | 313 | level = 0; |
314 | else | 314 | else |
315 | level = bd->props->brightness; | 315 | level = bd->props.brightness; |
316 | 316 | ||
317 | tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF; | 317 | tmp_pmc = par->riva.PMC[0x10F0/4] & 0x0000FFFF; |
318 | tmp_pcrt = par->riva.PCRTC0[0x081C/4] & 0xFFFFFFFC; | 318 | tmp_pcrt = par->riva.PCRTC0[0x081C/4] & 0xFFFFFFFC; |
@@ -329,13 +329,12 @@ static int riva_bl_update_status(struct backlight_device *bd) | |||
329 | 329 | ||
330 | static int riva_bl_get_brightness(struct backlight_device *bd) | 330 | static int riva_bl_get_brightness(struct backlight_device *bd) |
331 | { | 331 | { |
332 | return bd->props->brightness; | 332 | return bd->props.brightness; |
333 | } | 333 | } |
334 | 334 | ||
335 | static struct backlight_properties riva_bl_data = { | 335 | static struct backlight_ops riva_bl_ops = { |
336 | .get_brightness = riva_bl_get_brightness, | 336 | .get_brightness = riva_bl_get_brightness, |
337 | .update_status = riva_bl_update_status, | 337 | .update_status = riva_bl_update_status, |
338 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | ||
339 | }; | 338 | }; |
340 | 339 | ||
341 | static void riva_bl_init(struct riva_par *par) | 340 | static void riva_bl_init(struct riva_par *par) |
@@ -355,7 +354,7 @@ static void riva_bl_init(struct riva_par *par) | |||
355 | 354 | ||
356 | snprintf(name, sizeof(name), "rivabl%d", info->node); | 355 | snprintf(name, sizeof(name), "rivabl%d", info->node); |
357 | 356 | ||
358 | bd = backlight_device_register(name, info->dev, par, &riva_bl_data); | 357 | bd = backlight_device_register(name, info->dev, par, &riva_bl_ops); |
359 | if (IS_ERR(bd)) { | 358 | if (IS_ERR(bd)) { |
360 | info->bl_dev = NULL; | 359 | info->bl_dev = NULL; |
361 | printk(KERN_WARNING "riva: Backlight registration failed\n"); | 360 | printk(KERN_WARNING "riva: Backlight registration failed\n"); |
@@ -367,8 +366,9 @@ static void riva_bl_init(struct riva_par *par) | |||
367 | MIN_LEVEL * FB_BACKLIGHT_MAX / MAX_LEVEL, | 366 | MIN_LEVEL * FB_BACKLIGHT_MAX / MAX_LEVEL, |
368 | FB_BACKLIGHT_MAX); | 367 | FB_BACKLIGHT_MAX); |
369 | 368 | ||
370 | bd->props->brightness = riva_bl_data.max_brightness; | 369 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; |
371 | bd->props->power = FB_BLANK_UNBLANK; | 370 | bd->props.brightness = riva_bl_data.max_brightness; |
371 | bd->props.power = FB_BLANK_UNBLANK; | ||
372 | backlight_update_status(bd); | 372 | backlight_update_status(bd); |
373 | 373 | ||
374 | printk("riva: Backlight initialized (%s)\n", name); | 374 | printk("riva: Backlight initialized (%s)\n", name); |