diff options
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/corgi_bl.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c index bd9a6996aee7..6a219b2c77e3 100644 --- a/drivers/video/backlight/corgi_bl.c +++ b/drivers/video/backlight/corgi_bl.c | |||
@@ -79,13 +79,13 @@ static void corgibl_blank(int blank) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | #ifdef CONFIG_PM | 81 | #ifdef CONFIG_PM |
82 | static int corgibl_suspend(struct device *dev, pm_message_t state) | 82 | static int corgibl_suspend(struct platform_device *dev, pm_message_t state) |
83 | { | 83 | { |
84 | corgibl_blank(FB_BLANK_POWERDOWN); | 84 | corgibl_blank(FB_BLANK_POWERDOWN); |
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static int corgibl_resume(struct device *dev) | 88 | static int corgibl_resume(struct platform_device *dev) |
89 | { | 89 | { |
90 | corgibl_blank(FB_BLANK_UNBLANK); | 90 | corgibl_blank(FB_BLANK_UNBLANK); |
91 | return 0; | 91 | return 0; |
@@ -143,9 +143,9 @@ static struct backlight_properties corgibl_data = { | |||
143 | 143 | ||
144 | static struct backlight_device *corgi_backlight_device; | 144 | static struct backlight_device *corgi_backlight_device; |
145 | 145 | ||
146 | static int __init corgibl_probe(struct device *dev) | 146 | static int __init corgibl_probe(struct platform_device *pdev) |
147 | { | 147 | { |
148 | struct corgibl_machinfo *machinfo = dev->platform_data; | 148 | struct corgibl_machinfo *machinfo = pdev->dev.platform_data; |
149 | 149 | ||
150 | corgibl_data.max_brightness = machinfo->max_intensity; | 150 | corgibl_data.max_brightness = machinfo->max_intensity; |
151 | corgibl_mach_set_intensity = machinfo->set_bl_intensity; | 151 | corgibl_mach_set_intensity = machinfo->set_bl_intensity; |
@@ -162,7 +162,7 @@ static int __init corgibl_probe(struct device *dev) | |||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | ||
165 | static int corgibl_remove(struct device *dev) | 165 | static int corgibl_remove(struct platform_device *dev) |
166 | { | 166 | { |
167 | backlight_device_unregister(corgi_backlight_device); | 167 | backlight_device_unregister(corgi_backlight_device); |
168 | 168 | ||
@@ -172,23 +172,24 @@ static int corgibl_remove(struct device *dev) | |||
172 | return 0; | 172 | return 0; |
173 | } | 173 | } |
174 | 174 | ||
175 | static struct device_driver corgibl_driver = { | 175 | static struct platform_driver corgibl_driver = { |
176 | .name = "corgi-bl", | ||
177 | .bus = &platform_bus_type, | ||
178 | .probe = corgibl_probe, | 176 | .probe = corgibl_probe, |
179 | .remove = corgibl_remove, | 177 | .remove = corgibl_remove, |
180 | .suspend = corgibl_suspend, | 178 | .suspend = corgibl_suspend, |
181 | .resume = corgibl_resume, | 179 | .resume = corgibl_resume, |
180 | .driver = { | ||
181 | .name = "corgi-bl", | ||
182 | }, | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | static int __init corgibl_init(void) | 185 | static int __init corgibl_init(void) |
185 | { | 186 | { |
186 | return driver_register(&corgibl_driver); | 187 | return platform_driver_register(&corgibl_driver); |
187 | } | 188 | } |
188 | 189 | ||
189 | static void __exit corgibl_exit(void) | 190 | static void __exit corgibl_exit(void) |
190 | { | 191 | { |
191 | driver_unregister(&corgibl_driver); | 192 | platform_driver_unregister(&corgibl_driver); |
192 | } | 193 | } |
193 | 194 | ||
194 | module_init(corgibl_init); | 195 | module_init(corgibl_init); |