diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 17:32:44 -0500 |
commit | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch) | |
tree | d8825be54cefb6ad6707478d719c8e30605bee7b /arch/um | |
parent | 00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (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/um')
-rw-r--r-- | arch/um/drivers/net_kern.c | 9 | ||||
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 9 |
2 files changed, 10 insertions, 8 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index fe865d9a3721..b489aad12853 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -284,9 +284,10 @@ void uml_net_user_timer_expire(unsigned long _conn) | |||
284 | static DEFINE_SPINLOCK(devices_lock); | 284 | static DEFINE_SPINLOCK(devices_lock); |
285 | static struct list_head devices = LIST_HEAD_INIT(devices); | 285 | static struct list_head devices = LIST_HEAD_INIT(devices); |
286 | 286 | ||
287 | static struct device_driver uml_net_driver = { | 287 | static struct platform_driver uml_net_driver = { |
288 | .name = DRIVER_NAME, | 288 | .driver = { |
289 | .bus = &platform_bus_type, | 289 | .name = DRIVER_NAME, |
290 | }, | ||
290 | }; | 291 | }; |
291 | static int driver_registered; | 292 | static int driver_registered; |
292 | 293 | ||
@@ -333,7 +334,7 @@ static int eth_configure(int n, void *init, char *mac, | |||
333 | 334 | ||
334 | /* sysfs register */ | 335 | /* sysfs register */ |
335 | if (!driver_registered) { | 336 | if (!driver_registered) { |
336 | driver_register(¨_net_driver); | 337 | platform_driver_register(¨_net_driver); |
337 | driver_registered = 1; | 338 | driver_registered = 1; |
338 | } | 339 | } |
339 | device->pdev.id = n; | 340 | device->pdev.id = n; |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index b2c86257b0f8..93898917cbe5 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -823,9 +823,10 @@ static int ubd_mc_init(void) | |||
823 | 823 | ||
824 | __initcall(ubd_mc_init); | 824 | __initcall(ubd_mc_init); |
825 | 825 | ||
826 | static struct device_driver ubd_driver = { | 826 | static struct platform_driver ubd_driver = { |
827 | .name = DRIVER_NAME, | 827 | .driver = { |
828 | .bus = &platform_bus_type, | 828 | .name = DRIVER_NAME, |
829 | }, | ||
829 | }; | 830 | }; |
830 | 831 | ||
831 | int ubd_init(void) | 832 | int ubd_init(void) |
@@ -850,7 +851,7 @@ int ubd_init(void) | |||
850 | if (register_blkdev(fake_major, "ubd")) | 851 | if (register_blkdev(fake_major, "ubd")) |
851 | return -1; | 852 | return -1; |
852 | } | 853 | } |
853 | driver_register(&ubd_driver); | 854 | platform_driver_register(&ubd_driver); |
854 | for (i = 0; i < MAX_DEV; i++) | 855 | for (i = 0; i < MAX_DEV; i++) |
855 | ubd_add(i); | 856 | ubd_add(i); |
856 | return 0; | 857 | return 0; |