diff options
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r-- | drivers/video/nvidia/nv_backlight.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/video/nvidia/nv_backlight.c b/drivers/video/nvidia/nv_backlight.c index 0e2bc519dcab..b7016e9b9e13 100644 --- a/drivers/video/nvidia/nv_backlight.c +++ b/drivers/video/nvidia/nv_backlight.c | |||
@@ -54,11 +54,11 @@ static int nvidia_bl_update_status(struct backlight_device *bd) | |||
54 | if (!par->FlatPanel) | 54 | if (!par->FlatPanel) |
55 | return 0; | 55 | return 0; |
56 | 56 | ||
57 | if (bd->props->power != FB_BLANK_UNBLANK || | 57 | if (bd->props.power != FB_BLANK_UNBLANK || |
58 | bd->props->fb_blank != FB_BLANK_UNBLANK) | 58 | bd->props.fb_blank != FB_BLANK_UNBLANK) |
59 | level = 0; | 59 | level = 0; |
60 | else | 60 | else |
61 | level = bd->props->brightness; | 61 | level = bd->props.brightness; |
62 | 62 | ||
63 | tmp_pmc = NV_RD32(par->PMC, 0x10F0) & 0x0000FFFF; | 63 | tmp_pmc = NV_RD32(par->PMC, 0x10F0) & 0x0000FFFF; |
64 | tmp_pcrt = NV_RD32(par->PCRTC0, 0x081C) & 0xFFFFFFFC; | 64 | tmp_pcrt = NV_RD32(par->PCRTC0, 0x081C) & 0xFFFFFFFC; |
@@ -81,13 +81,12 @@ static int nvidia_bl_update_status(struct backlight_device *bd) | |||
81 | 81 | ||
82 | static int nvidia_bl_get_brightness(struct backlight_device *bd) | 82 | static int nvidia_bl_get_brightness(struct backlight_device *bd) |
83 | { | 83 | { |
84 | return bd->props->brightness; | 84 | return bd->props.brightness; |
85 | } | 85 | } |
86 | 86 | ||
87 | static struct backlight_properties nvidia_bl_data = { | 87 | static struct backlight_ops nvidia_bl_ops = { |
88 | .get_brightness = nvidia_bl_get_brightness, | 88 | .get_brightness = nvidia_bl_get_brightness, |
89 | .update_status = nvidia_bl_update_status, | 89 | .update_status = nvidia_bl_update_status, |
90 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | ||
91 | }; | 90 | }; |
92 | 91 | ||
93 | void nvidia_bl_init(struct nvidia_par *par) | 92 | void nvidia_bl_init(struct nvidia_par *par) |
@@ -107,7 +106,7 @@ void nvidia_bl_init(struct nvidia_par *par) | |||
107 | 106 | ||
108 | snprintf(name, sizeof(name), "nvidiabl%d", info->node); | 107 | snprintf(name, sizeof(name), "nvidiabl%d", info->node); |
109 | 108 | ||
110 | bd = backlight_device_register(name, info->dev, par, &nvidia_bl_data); | 109 | bd = backlight_device_register(name, info->dev, par, &nvidia_bl_ops); |
111 | if (IS_ERR(bd)) { | 110 | if (IS_ERR(bd)) { |
112 | info->bl_dev = NULL; | 111 | info->bl_dev = NULL; |
113 | printk(KERN_WARNING "nvidia: Backlight registration failed\n"); | 112 | printk(KERN_WARNING "nvidia: Backlight registration failed\n"); |
@@ -119,8 +118,9 @@ void nvidia_bl_init(struct nvidia_par *par) | |||
119 | 0x158 * FB_BACKLIGHT_MAX / MAX_LEVEL, | 118 | 0x158 * FB_BACKLIGHT_MAX / MAX_LEVEL, |
120 | 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL); | 119 | 0x534 * FB_BACKLIGHT_MAX / MAX_LEVEL); |
121 | 120 | ||
122 | bd->props->brightness = nvidia_bl_data.max_brightness; | 121 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; |
123 | bd->props->power = FB_BLANK_UNBLANK; | 122 | bd->props.brightness = nvidia_bl_data.max_brightness; |
123 | bd->props.power = FB_BLANK_UNBLANK; | ||
124 | backlight_update_status(bd); | 124 | backlight_update_status(bd); |
125 | 125 | ||
126 | printk("nvidia: Backlight initialized (%s)\n", name); | 126 | printk("nvidia: Backlight initialized (%s)\n", name); |