aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/corgi_bl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/backlight/corgi_bl.c')
-rw-r--r--drivers/video/backlight/corgi_bl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c
index c1eba0e8a1b0..05f36811ac95 100644
--- a/drivers/video/backlight/corgi_bl.c
+++ b/drivers/video/backlight/corgi_bl.c
@@ -34,11 +34,11 @@ static unsigned long corgibl_flags;
34static int corgibl_send_intensity(struct backlight_device *bd) 34static int corgibl_send_intensity(struct backlight_device *bd)
35{ 35{
36 void (*corgi_kick_batt)(void); 36 void (*corgi_kick_batt)(void);
37 int intensity = bd->props->brightness; 37 int intensity = bd->props.brightness;
38 38
39 if (bd->props->power != FB_BLANK_UNBLANK) 39 if (bd->props.power != FB_BLANK_UNBLANK)
40 intensity = 0; 40 intensity = 0;
41 if (bd->props->fb_blank != FB_BLANK_UNBLANK) 41 if (bd->props.fb_blank != FB_BLANK_UNBLANK)
42 intensity = 0; 42 intensity = 0;
43 if (corgibl_flags & CORGIBL_SUSPENDED) 43 if (corgibl_flags & CORGIBL_SUSPENDED)
44 intensity = 0; 44 intensity = 0;
@@ -103,7 +103,7 @@ void corgibl_limit_intensity(int limit)
103EXPORT_SYMBOL(corgibl_limit_intensity); 103EXPORT_SYMBOL(corgibl_limit_intensity);
104 104
105 105
106static struct backlight_properties corgibl_data = { 106static struct backlight_ops corgibl_ops = {
107 .get_brightness = corgibl_get_intensity, 107 .get_brightness = corgibl_get_intensity,
108 .update_status = corgibl_send_intensity, 108 .update_status = corgibl_send_intensity,
109}; 109};
@@ -113,19 +113,19 @@ static int corgibl_probe(struct platform_device *pdev)
113 struct corgibl_machinfo *machinfo = pdev->dev.platform_data; 113 struct corgibl_machinfo *machinfo = pdev->dev.platform_data;
114 114
115 bl_machinfo = machinfo; 115 bl_machinfo = machinfo;
116 corgibl_data.max_brightness = machinfo->max_intensity;
117 if (!machinfo->limit_mask) 116 if (!machinfo->limit_mask)
118 machinfo->limit_mask = -1; 117 machinfo->limit_mask = -1;
119 118
120 corgi_backlight_device = backlight_device_register ("corgi-bl", 119 corgi_backlight_device = backlight_device_register ("corgi-bl",
121 &pdev->dev, NULL, &corgibl_data); 120 &pdev->dev, NULL, &corgibl_ops);
122 if (IS_ERR (corgi_backlight_device)) 121 if (IS_ERR (corgi_backlight_device))
123 return PTR_ERR (corgi_backlight_device); 122 return PTR_ERR (corgi_backlight_device);
124 123
125 platform_set_drvdata(pdev, corgi_backlight_device); 124 platform_set_drvdata(pdev, corgi_backlight_device);
126 125
127 corgibl_data.power = FB_BLANK_UNBLANK; 126 corgi_backlight_device->props.max_brightness = machinfo->max_intensity;
128 corgibl_data.brightness = machinfo->default_intensity; 127 corgi_backlight_device->props.power = FB_BLANK_UNBLANK;
128 corgi_backlight_device->props.brightness = machinfo->default_intensity;
129 corgibl_send_intensity(corgi_backlight_device); 129 corgibl_send_intensity(corgi_backlight_device);
130 130
131 printk("Corgi Backlight Driver Initialized.\n"); 131 printk("Corgi Backlight Driver Initialized.\n");