summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/wbsd.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/mmc/wbsd.c
parent00d3dcdd96646be6059cc21f2efa94c4edc1eda5 (diff)
downloadlinux-3ae5eaec1d2d9c0cf53745352e7d4b152810ba24.tar.bz2
[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/mmc/wbsd.c')
-rw-r--r--drivers/mmc/wbsd.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index e954b8354fef..ea23a31fac90 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -1932,14 +1932,14 @@ static void __devexit wbsd_shutdown(struct device* dev, int pnp)
* Non-PnP
*/
-static int __devinit wbsd_probe(struct device* dev)
+static int __devinit wbsd_probe(struct platform_device* dev)
{
- return wbsd_init(dev, io, irq, dma, 0);
+ return wbsd_init(&dev->dev, io, irq, dma, 0);
}
-static int __devexit wbsd_remove(struct device* dev)
+static int __devexit wbsd_remove(struct platform_device* dev)
{
- wbsd_shutdown(dev, 0);
+ wbsd_shutdown(&dev->dev, 0);
return 0;
}
@@ -1983,9 +1983,9 @@ static void __devexit wbsd_pnp_remove(struct pnp_dev * dev)
#ifdef CONFIG_PM
-static int wbsd_suspend(struct device *dev, pm_message_t state)
+static int wbsd_suspend(struct platform_device *dev, pm_message_t state)
{
- struct mmc_host *mmc = dev_get_drvdata(dev);
+ struct mmc_host *mmc = platform_get_drvdata(dev);
struct wbsd_host *host;
int ret;
@@ -2005,9 +2005,9 @@ static int wbsd_suspend(struct device *dev, pm_message_t state)
return 0;
}
-static int wbsd_resume(struct device *dev)
+static int wbsd_resume(struct platform_device *dev)
{
- struct mmc_host *mmc = dev_get_drvdata(dev);
+ struct mmc_host *mmc = platform_get_drvdata(dev);
struct wbsd_host *host;
if (!mmc)
@@ -2038,14 +2038,15 @@ static int wbsd_resume(struct device *dev)
static struct platform_device *wbsd_device;
-static struct device_driver wbsd_driver = {
- .name = DRIVER_NAME,
- .bus = &platform_bus_type,
+static struct platform_driver wbsd_driver = {
.probe = wbsd_probe,
.remove = wbsd_remove,
.suspend = wbsd_suspend,
.resume = wbsd_resume,
+ .driver = {
+ .name = DRIVER_NAME,
+ },
};
#ifdef CONFIG_PNP
@@ -2085,7 +2086,7 @@ static int __init wbsd_drv_init(void)
if (nopnp)
{
- result = driver_register(&wbsd_driver);
+ result = platform_driver_register(&wbsd_driver);
if (result < 0)
return result;
@@ -2111,7 +2112,7 @@ static void __exit wbsd_drv_exit(void)
{
platform_device_unregister(wbsd_device);
- driver_unregister(&wbsd_driver);
+ platform_driver_unregister(&wbsd_driver);
}
DBG("unloaded\n");