aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-11-09 17:32:44 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-09 17:32:44 -0500
commit3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch)
treed8825be54cefb6ad6707478d719c8e30605bee7b /arch/arm/mach-pxa
parent00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff)
[DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index 591e5f32dbec..9f835f32b938 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -191,7 +191,7 @@ void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
191 ssp_machinfo = machinfo; 191 ssp_machinfo = machinfo;
192} 192}
193 193
194static int __init corgi_ssp_probe(struct device *dev) 194static int __init corgi_ssp_probe(struct platform_device *dev)
195{ 195{
196 int ret; 196 int ret;
197 197
@@ -216,13 +216,13 @@ static int __init corgi_ssp_probe(struct device *dev)
216 return ret; 216 return ret;
217} 217}
218 218
219static int corgi_ssp_remove(struct device *dev) 219static int corgi_ssp_remove(struct platform_device *dev)
220{ 220{
221 ssp_exit(&corgi_ssp_dev); 221 ssp_exit(&corgi_ssp_dev);
222 return 0; 222 return 0;
223} 223}
224 224
225static int corgi_ssp_suspend(struct device *dev, pm_message_t state) 225static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state)
226{ 226{
227 ssp_flush(&corgi_ssp_dev); 227 ssp_flush(&corgi_ssp_dev);
228 ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state); 228 ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state);
@@ -230,7 +230,7 @@ static int corgi_ssp_suspend(struct device *dev, pm_message_t state)
230 return 0; 230 return 0;
231} 231}
232 232
233static int corgi_ssp_resume(struct device *dev) 233static int corgi_ssp_resume(struct platform_device *dev)
234{ 234{
235 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ 235 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */
236 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ 236 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/
@@ -241,18 +241,19 @@ static int corgi_ssp_resume(struct device *dev)
241 return 0; 241 return 0;
242} 242}
243 243
244static struct device_driver corgissp_driver = { 244static struct platform_driver corgissp_driver = {
245 .name = "corgi-ssp",
246 .bus = &platform_bus_type,
247 .probe = corgi_ssp_probe, 245 .probe = corgi_ssp_probe,
248 .remove = corgi_ssp_remove, 246 .remove = corgi_ssp_remove,
249 .suspend = corgi_ssp_suspend, 247 .suspend = corgi_ssp_suspend,
250 .resume = corgi_ssp_resume, 248 .resume = corgi_ssp_resume,
249 .driver = {
250 .name = "corgi-ssp",
251 },
251}; 252};
252 253
253int __init corgi_ssp_init(void) 254int __init corgi_ssp_init(void)
254{ 255{
255 return driver_register(&corgissp_driver); 256 return platform_driver_register(&corgissp_driver);
256} 257}
257 258
258arch_initcall(corgi_ssp_init); 259arch_initcall(corgi_ssp_init);