aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/wbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/wbsd.c')
-rw-r--r--drivers/mmc/host/wbsd.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index c303e7f57ab4..adda37952032 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -68,16 +68,16 @@ static const int unlock_codes[] = { 0x83, 0x87 };
68 68
69static const int valid_ids[] = { 69static const int valid_ids[] = {
70 0x7112, 70 0x7112,
71 }; 71};
72 72
73#ifdef CONFIG_PNP 73#ifdef CONFIG_PNP
74static unsigned int nopnp = 0; 74static unsigned int param_nopnp = 0;
75#else 75#else
76static const unsigned int nopnp = 1; 76static const unsigned int param_nopnp = 1;
77#endif 77#endif
78static unsigned int io = 0x248; 78static unsigned int param_io = 0x248;
79static unsigned int irq = 6; 79static unsigned int param_irq = 6;
80static int dma = 2; 80static int param_dma = 2;
81 81
82/* 82/*
83 * Basic functions 83 * Basic functions
@@ -939,7 +939,7 @@ static int wbsd_get_ro(struct mmc_host *mmc)
939 939
940 spin_unlock_bh(&host->lock); 940 spin_unlock_bh(&host->lock);
941 941
942 return csr & WBSD_WRPT; 942 return !!(csr & WBSD_WRPT);
943} 943}
944 944
945static const struct mmc_host_ops wbsd_ops = { 945static const struct mmc_host_ops wbsd_ops = {
@@ -1219,7 +1219,7 @@ static int __devinit wbsd_alloc_mmc(struct device *dev)
1219 mmc->f_min = 375000; 1219 mmc->f_min = 375000;
1220 mmc->f_max = 24000000; 1220 mmc->f_max = 24000000;
1221 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; 1221 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
1222 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MULTIWRITE; 1222 mmc->caps = MMC_CAP_4_BIT_DATA;
1223 1223
1224 spin_lock_init(&host->lock); 1224 spin_lock_init(&host->lock);
1225 1225
@@ -1420,7 +1420,7 @@ kfree:
1420 1420
1421 dma_unmap_single(mmc_dev(host->mmc), host->dma_addr, 1421 dma_unmap_single(mmc_dev(host->mmc), host->dma_addr,
1422 WBSD_DMA_SIZE, DMA_BIDIRECTIONAL); 1422 WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
1423 host->dma_addr = (dma_addr_t)NULL; 1423 host->dma_addr = 0;
1424 1424
1425 kfree(host->dma_buffer); 1425 kfree(host->dma_buffer);
1426 host->dma_buffer = NULL; 1426 host->dma_buffer = NULL;
@@ -1445,7 +1445,7 @@ static void wbsd_release_dma(struct wbsd_host *host)
1445 1445
1446 host->dma = -1; 1446 host->dma = -1;
1447 host->dma_buffer = NULL; 1447 host->dma_buffer = NULL;
1448 host->dma_addr = (dma_addr_t)NULL; 1448 host->dma_addr = 0;
1449} 1449}
1450 1450
1451/* 1451/*
@@ -1765,7 +1765,7 @@ static void __devexit wbsd_shutdown(struct device *dev, int pnp)
1765static int __devinit wbsd_probe(struct platform_device *dev) 1765static int __devinit wbsd_probe(struct platform_device *dev)
1766{ 1766{
1767 /* Use the module parameters for resources */ 1767 /* Use the module parameters for resources */
1768 return wbsd_init(&dev->dev, io, irq, dma, 0); 1768 return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0);
1769} 1769}
1770 1770
1771static int __devexit wbsd_remove(struct platform_device *dev) 1771static int __devexit wbsd_remove(struct platform_device *dev)
@@ -1979,14 +1979,14 @@ static int __init wbsd_drv_init(void)
1979 1979
1980#ifdef CONFIG_PNP 1980#ifdef CONFIG_PNP
1981 1981
1982 if (!nopnp) { 1982 if (!param_nopnp) {
1983 result = pnp_register_driver(&wbsd_pnp_driver); 1983 result = pnp_register_driver(&wbsd_pnp_driver);
1984 if (result < 0) 1984 if (result < 0)
1985 return result; 1985 return result;
1986 } 1986 }
1987#endif /* CONFIG_PNP */ 1987#endif /* CONFIG_PNP */
1988 1988
1989 if (nopnp) { 1989 if (param_nopnp) {
1990 result = platform_driver_register(&wbsd_driver); 1990 result = platform_driver_register(&wbsd_driver);
1991 if (result < 0) 1991 if (result < 0)
1992 return result; 1992 return result;
@@ -2012,12 +2012,12 @@ static void __exit wbsd_drv_exit(void)
2012{ 2012{
2013#ifdef CONFIG_PNP 2013#ifdef CONFIG_PNP
2014 2014
2015 if (!nopnp) 2015 if (!param_nopnp)
2016 pnp_unregister_driver(&wbsd_pnp_driver); 2016 pnp_unregister_driver(&wbsd_pnp_driver);
2017 2017
2018#endif /* CONFIG_PNP */ 2018#endif /* CONFIG_PNP */
2019 2019
2020 if (nopnp) { 2020 if (param_nopnp) {
2021 platform_device_unregister(wbsd_device); 2021 platform_device_unregister(wbsd_device);
2022 2022
2023 platform_driver_unregister(&wbsd_driver); 2023 platform_driver_unregister(&wbsd_driver);
@@ -2029,11 +2029,11 @@ static void __exit wbsd_drv_exit(void)
2029module_init(wbsd_drv_init); 2029module_init(wbsd_drv_init);
2030module_exit(wbsd_drv_exit); 2030module_exit(wbsd_drv_exit);
2031#ifdef CONFIG_PNP 2031#ifdef CONFIG_PNP
2032module_param(nopnp, uint, 0444); 2032module_param_named(nopnp, param_nopnp, uint, 0444);
2033#endif 2033#endif
2034module_param(io, uint, 0444); 2034module_param_named(io, param_io, uint, 0444);
2035module_param(irq, uint, 0444); 2035module_param_named(irq, param_irq, uint, 0444);
2036module_param(dma, int, 0444); 2036module_param_named(dma, param_dma, int, 0444);
2037 2037
2038MODULE_LICENSE("GPL"); 2038MODULE_LICENSE("GPL");
2039MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); 2039MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");