aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/wbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/wbsd.c')
-rw-r--r--drivers/mmc/wbsd.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index e954b8354fef..c7eb7c269081 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -42,7 +42,7 @@
42#include "wbsd.h" 42#include "wbsd.h"
43 43
44#define DRIVER_NAME "wbsd" 44#define DRIVER_NAME "wbsd"
45#define DRIVER_VERSION "1.4" 45#define DRIVER_VERSION "1.5"
46 46
47#ifdef CONFIG_MMC_DEBUG 47#ifdef CONFIG_MMC_DEBUG
48#define DBG(x...) \ 48#define DBG(x...) \
@@ -1932,14 +1932,14 @@ static void __devexit wbsd_shutdown(struct device* dev, int pnp)
1932 * Non-PnP 1932 * Non-PnP
1933 */ 1933 */
1934 1934
1935static int __devinit wbsd_probe(struct device* dev) 1935static int __devinit wbsd_probe(struct platform_device* dev)
1936{ 1936{
1937 return wbsd_init(dev, io, irq, dma, 0); 1937 return wbsd_init(&dev->dev, io, irq, dma, 0);
1938} 1938}
1939 1939
1940static int __devexit wbsd_remove(struct device* dev) 1940static int __devexit wbsd_remove(struct platform_device* dev)
1941{ 1941{
1942 wbsd_shutdown(dev, 0); 1942 wbsd_shutdown(&dev->dev, 0);
1943 1943
1944 return 0; 1944 return 0;
1945} 1945}
@@ -1983,9 +1983,9 @@ static void __devexit wbsd_pnp_remove(struct pnp_dev * dev)
1983 1983
1984#ifdef CONFIG_PM 1984#ifdef CONFIG_PM
1985 1985
1986static int wbsd_suspend(struct device *dev, pm_message_t state) 1986static int wbsd_suspend(struct platform_device *dev, pm_message_t state)
1987{ 1987{
1988 struct mmc_host *mmc = dev_get_drvdata(dev); 1988 struct mmc_host *mmc = platform_get_drvdata(dev);
1989 struct wbsd_host *host; 1989 struct wbsd_host *host;
1990 int ret; 1990 int ret;
1991 1991
@@ -2005,9 +2005,9 @@ static int wbsd_suspend(struct device *dev, pm_message_t state)
2005 return 0; 2005 return 0;
2006} 2006}
2007 2007
2008static int wbsd_resume(struct device *dev) 2008static int wbsd_resume(struct platform_device *dev)
2009{ 2009{
2010 struct mmc_host *mmc = dev_get_drvdata(dev); 2010 struct mmc_host *mmc = platform_get_drvdata(dev);
2011 struct wbsd_host *host; 2011 struct wbsd_host *host;
2012 2012
2013 if (!mmc) 2013 if (!mmc)
@@ -2038,14 +2038,15 @@ static int wbsd_resume(struct device *dev)
2038 2038
2039static struct platform_device *wbsd_device; 2039static struct platform_device *wbsd_device;
2040 2040
2041static struct device_driver wbsd_driver = { 2041static struct platform_driver wbsd_driver = {
2042 .name = DRIVER_NAME,
2043 .bus = &platform_bus_type,
2044 .probe = wbsd_probe, 2042 .probe = wbsd_probe,
2045 .remove = wbsd_remove, 2043 .remove = __devexit_p(wbsd_remove),
2046 2044
2047 .suspend = wbsd_suspend, 2045 .suspend = wbsd_suspend,
2048 .resume = wbsd_resume, 2046 .resume = wbsd_resume,
2047 .driver = {
2048 .name = DRIVER_NAME,
2049 },
2049}; 2050};
2050 2051
2051#ifdef CONFIG_PNP 2052#ifdef CONFIG_PNP
@@ -2054,7 +2055,7 @@ static struct pnp_driver wbsd_pnp_driver = {
2054 .name = DRIVER_NAME, 2055 .name = DRIVER_NAME,
2055 .id_table = pnp_dev_table, 2056 .id_table = pnp_dev_table,
2056 .probe = wbsd_pnp_probe, 2057 .probe = wbsd_pnp_probe,
2057 .remove = wbsd_pnp_remove, 2058 .remove = __devexit_p(wbsd_pnp_remove),
2058}; 2059};
2059 2060
2060#endif /* CONFIG_PNP */ 2061#endif /* CONFIG_PNP */
@@ -2085,7 +2086,7 @@ static int __init wbsd_drv_init(void)
2085 2086
2086 if (nopnp) 2087 if (nopnp)
2087 { 2088 {
2088 result = driver_register(&wbsd_driver); 2089 result = platform_driver_register(&wbsd_driver);
2089 if (result < 0) 2090 if (result < 0)
2090 return result; 2091 return result;
2091 2092
@@ -2111,7 +2112,7 @@ static void __exit wbsd_drv_exit(void)
2111 { 2112 {
2112 platform_device_unregister(wbsd_device); 2113 platform_device_unregister(wbsd_device);
2113 2114
2114 driver_unregister(&wbsd_driver); 2115 platform_driver_unregister(&wbsd_driver);
2115 } 2116 }
2116 2117
2117 DBG("unloaded\n"); 2118 DBG("unloaded\n");
@@ -2127,6 +2128,7 @@ module_param(irq, uint, 0444);
2127module_param(dma, int, 0444); 2128module_param(dma, int, 0444);
2128 2129
2129MODULE_LICENSE("GPL"); 2130MODULE_LICENSE("GPL");
2131MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
2130MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver"); 2132MODULE_DESCRIPTION("Winbond W83L51xD SD/MMC card interface driver");
2131MODULE_VERSION(DRIVER_VERSION); 2133MODULE_VERSION(DRIVER_VERSION);
2132 2134