diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-11-09 23:32:44 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-11-09 23:32:44 +0100 |
commit | 3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch) | |
tree | d8825be54cefb6ad6707478d719c8e30605bee7b /drivers/video/acornfb.c | |
parent | [DRIVER MODEL] Add platform_driver (diff) | |
download | linux-3ae5eaec1d2d9c0cf53745352e7d4b152810ba24.tar.xz linux-3ae5eaec1d2d9c0cf53745352e7d4b152810ba24.zip |
[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 'drivers/video/acornfb.c')
-rw-r--r-- | drivers/video/acornfb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c index 193b482570c7..750cebb18306 100644 --- a/drivers/video/acornfb.c +++ b/drivers/video/acornfb.c @@ -1279,7 +1279,7 @@ free_unused_pages(unsigned int virtual_start, unsigned int virtual_end) printk("acornfb: freed %dK memory\n", mb_freed); } -static int __init acornfb_probe(struct device *dev) +static int __init acornfb_probe(struct platform_device *dev) { unsigned long size; u_int h_sync, v_sync; @@ -1292,7 +1292,7 @@ static int __init acornfb_probe(struct device *dev) acornfb_init_fbinfo(); - current_par.dev = dev; + current_par.dev = &dev->dev; if (current_par.montype == -1) current_par.montype = acornfb_detect_monitortype(); @@ -1453,15 +1453,16 @@ static int __init acornfb_probe(struct device *dev) return 0; } -static struct device_driver acornfb_driver = { - .name = "acornfb", - .bus = &platform_bus_type, +static struct platform_driver acornfb_driver = { .probe = acornfb_probe, + .driver = { + .name = "acornfb", + }, }; static int __init acornfb_init(void) { - return driver_register(&acornfb_driver); + return platform_driver_register(&acornfb_driver); } module_init(acornfb_init); |