aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/vr41xx_giu.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-11-09 22:32:44 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-11-09 22:32:44 +0000
commit3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (patch)
treed8825be54cefb6ad6707478d719c8e30605bee7b /drivers/char/vr41xx_giu.c
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 'drivers/char/vr41xx_giu.c')
-rw-r--r--drivers/char/vr41xx_giu.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c
index 94641085faf..9ac6d43437b 100644
--- a/drivers/char/vr41xx_giu.c
+++ b/drivers/char/vr41xx_giu.c
@@ -613,7 +613,7 @@ static struct file_operations gpio_fops = {
.release = gpio_release,
};
-static int giu_probe(struct device *dev)
+static int giu_probe(struct platform_device *dev)
{
unsigned long start, size, flags = 0;
unsigned int nr_pins = 0;
@@ -697,7 +697,7 @@ static int giu_probe(struct device *dev)
return cascade_irq(GIUINT_IRQ, giu_get_irq);
}
-static int giu_remove(struct device *dev)
+static int giu_remove(struct platform_device *dev)
{
iounmap(giu_base);
@@ -710,11 +710,12 @@ static int giu_remove(struct device *dev)
static struct platform_device *giu_platform_device;
-static struct device_driver giu_device_driver = {
- .name = "GIU",
- .bus = &platform_bus_type,
+static struct platform_driver giu_device_driver = {
.probe = giu_probe,
.remove = giu_remove,
+ .driver = {
+ .name = "GIU",
+ },
};
static int __devinit vr41xx_giu_init(void)
@@ -725,7 +726,7 @@ static int __devinit vr41xx_giu_init(void)
if (IS_ERR(giu_platform_device))
return PTR_ERR(giu_platform_device);
- retval = driver_register(&giu_device_driver);
+ retval = platform_driver_register(&giu_device_driver);
if (retval < 0)
platform_device_unregister(giu_platform_device);
@@ -734,7 +735,7 @@ static int __devinit vr41xx_giu_init(void)
static void __devexit vr41xx_giu_exit(void)
{
- driver_unregister(&giu_device_driver);
+ platform_driver_unregister(&giu_device_driver);
platform_device_unregister(giu_platform_device);
}