From 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 9 Nov 2005 22:32:44 +0000 Subject: [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 Acked-by: Greg Kroah-Hartman --- arch/arm/mach-pxa/corgi_ssp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'arch/arm/mach-pxa/corgi_ssp.c') diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c index 591e5f32dbe..9f835f32b93 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) ssp_machinfo = machinfo; } -static int __init corgi_ssp_probe(struct device *dev) +static int __init corgi_ssp_probe(struct platform_device *dev) { int ret; @@ -216,13 +216,13 @@ static int __init corgi_ssp_probe(struct device *dev) return ret; } -static int corgi_ssp_remove(struct device *dev) +static int corgi_ssp_remove(struct platform_device *dev) { ssp_exit(&corgi_ssp_dev); return 0; } -static int corgi_ssp_suspend(struct device *dev, pm_message_t state) +static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state) { ssp_flush(&corgi_ssp_dev); 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) return 0; } -static int corgi_ssp_resume(struct device *dev) +static int corgi_ssp_resume(struct platform_device *dev) { GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ 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) return 0; } -static struct device_driver corgissp_driver = { - .name = "corgi-ssp", - .bus = &platform_bus_type, +static struct platform_driver corgissp_driver = { .probe = corgi_ssp_probe, .remove = corgi_ssp_remove, .suspend = corgi_ssp_suspend, .resume = corgi_ssp_resume, + .driver = { + .name = "corgi-ssp", + }, }; int __init corgi_ssp_init(void) { - return driver_register(&corgissp_driver); + return platform_driver_register(&corgissp_driver); } arch_initcall(corgi_ssp_init); -- cgit v1.2.3-70-g09d2