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.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/mmc/host/wbsd.c b/drivers/mmc/host/wbsd.c
index e954b775887..62e5a4d171e 100644
--- a/drivers/mmc/host/wbsd.c
+++ b/drivers/mmc/host/wbsd.c
@@ -194,7 +194,7 @@ static void wbsd_reset(struct wbsd_host *host)
194{ 194{
195 u8 setup; 195 u8 setup;
196 196
197 pr_err("%s: Resetting chip\n", mmc_hostname(host->mmc)); 197 printk(KERN_ERR "%s: Resetting chip\n", mmc_hostname(host->mmc));
198 198
199 /* 199 /*
200 * Soft reset of chip (SD/MMC part). 200 * Soft reset of chip (SD/MMC part).
@@ -721,7 +721,7 @@ static void wbsd_finish_data(struct wbsd_host *host, struct mmc_data *data)
721 * Any leftover data? 721 * Any leftover data?
722 */ 722 */
723 if (count) { 723 if (count) {
724 pr_err("%s: Incomplete DMA transfer. " 724 printk(KERN_ERR "%s: Incomplete DMA transfer. "
725 "%d bytes left.\n", 725 "%d bytes left.\n",
726 mmc_hostname(host->mmc), count); 726 mmc_hostname(host->mmc), count);
727 727
@@ -803,7 +803,7 @@ static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq)
803 803
804 default: 804 default:
805#ifdef CONFIG_MMC_DEBUG 805#ifdef CONFIG_MMC_DEBUG
806 pr_warning("%s: Data command %d is not " 806 printk(KERN_WARNING "%s: Data command %d is not "
807 "supported by this controller.\n", 807 "supported by this controller.\n",
808 mmc_hostname(host->mmc), cmd->opcode); 808 mmc_hostname(host->mmc), cmd->opcode);
809#endif 809#endif
@@ -1029,7 +1029,7 @@ static void wbsd_tasklet_card(unsigned long param)
1029 host->flags &= ~WBSD_FCARD_PRESENT; 1029 host->flags &= ~WBSD_FCARD_PRESENT;
1030 1030
1031 if (host->mrq) { 1031 if (host->mrq) {
1032 pr_err("%s: Card removed during transfer!\n", 1032 printk(KERN_ERR "%s: Card removed during transfer!\n",
1033 mmc_hostname(host->mmc)); 1033 mmc_hostname(host->mmc));
1034 wbsd_reset(host); 1034 wbsd_reset(host);
1035 1035
@@ -1196,7 +1196,7 @@ static irqreturn_t wbsd_irq(int irq, void *dev_id)
1196 * Allocate/free MMC structure. 1196 * Allocate/free MMC structure.
1197 */ 1197 */
1198 1198
1199static int wbsd_alloc_mmc(struct device *dev) 1199static int __devinit wbsd_alloc_mmc(struct device *dev)
1200{ 1200{
1201 struct mmc_host *mmc; 1201 struct mmc_host *mmc;
1202 struct wbsd_host *host; 1202 struct wbsd_host *host;
@@ -1288,7 +1288,7 @@ static void wbsd_free_mmc(struct device *dev)
1288 * Scan for known chip id:s 1288 * Scan for known chip id:s
1289 */ 1289 */
1290 1290
1291static int wbsd_scan(struct wbsd_host *host) 1291static int __devinit wbsd_scan(struct wbsd_host *host)
1292{ 1292{
1293 int i, j, k; 1293 int i, j, k;
1294 int id; 1294 int id;
@@ -1344,7 +1344,7 @@ static int wbsd_scan(struct wbsd_host *host)
1344 * Allocate/free io port ranges 1344 * Allocate/free io port ranges
1345 */ 1345 */
1346 1346
1347static int wbsd_request_region(struct wbsd_host *host, int base) 1347static int __devinit wbsd_request_region(struct wbsd_host *host, int base)
1348{ 1348{
1349 if (base & 0x7) 1349 if (base & 0x7)
1350 return -EINVAL; 1350 return -EINVAL;
@@ -1374,7 +1374,7 @@ static void wbsd_release_regions(struct wbsd_host *host)
1374 * Allocate/free DMA port and buffer 1374 * Allocate/free DMA port and buffer
1375 */ 1375 */
1376 1376
1377static void wbsd_request_dma(struct wbsd_host *host, int dma) 1377static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma)
1378{ 1378{
1379 if (dma < 0) 1379 if (dma < 0)
1380 return; 1380 return;
@@ -1429,7 +1429,7 @@ free:
1429 free_dma(dma); 1429 free_dma(dma);
1430 1430
1431err: 1431err:
1432 pr_warning(DRIVER_NAME ": Unable to allocate DMA %d. " 1432 printk(KERN_WARNING DRIVER_NAME ": Unable to allocate DMA %d. "
1433 "Falling back on FIFO.\n", dma); 1433 "Falling back on FIFO.\n", dma);
1434} 1434}
1435 1435
@@ -1452,7 +1452,7 @@ static void wbsd_release_dma(struct wbsd_host *host)
1452 * Allocate/free IRQ. 1452 * Allocate/free IRQ.
1453 */ 1453 */
1454 1454
1455static int wbsd_request_irq(struct wbsd_host *host, int irq) 1455static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
1456{ 1456{
1457 int ret; 1457 int ret;
1458 1458
@@ -1502,7 +1502,7 @@ static void wbsd_release_irq(struct wbsd_host *host)
1502 * Allocate all resources for the host. 1502 * Allocate all resources for the host.
1503 */ 1503 */
1504 1504
1505static int wbsd_request_resources(struct wbsd_host *host, 1505static int __devinit wbsd_request_resources(struct wbsd_host *host,
1506 int base, int irq, int dma) 1506 int base, int irq, int dma)
1507{ 1507{
1508 int ret; 1508 int ret;
@@ -1644,7 +1644,7 @@ static void wbsd_chip_poweroff(struct wbsd_host *host)
1644 * * 1644 * *
1645\*****************************************************************************/ 1645\*****************************************************************************/
1646 1646
1647static int wbsd_init(struct device *dev, int base, int irq, int dma, 1647static int __devinit wbsd_init(struct device *dev, int base, int irq, int dma,
1648 int pnp) 1648 int pnp)
1649{ 1649{
1650 struct wbsd_host *host = NULL; 1650 struct wbsd_host *host = NULL;
@@ -1664,7 +1664,7 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
1664 ret = wbsd_scan(host); 1664 ret = wbsd_scan(host);
1665 if (ret) { 1665 if (ret) {
1666 if (pnp && (ret == -ENODEV)) { 1666 if (pnp && (ret == -ENODEV)) {
1667 pr_warning(DRIVER_NAME 1667 printk(KERN_WARNING DRIVER_NAME
1668 ": Unable to confirm device presence. You may " 1668 ": Unable to confirm device presence. You may "
1669 "experience lock-ups.\n"); 1669 "experience lock-ups.\n");
1670 } else { 1670 } else {
@@ -1688,7 +1688,7 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
1688 */ 1688 */
1689 if (pnp) { 1689 if (pnp) {
1690 if ((host->config != 0) && !wbsd_chip_validate(host)) { 1690 if ((host->config != 0) && !wbsd_chip_validate(host)) {
1691 pr_warning(DRIVER_NAME 1691 printk(KERN_WARNING DRIVER_NAME
1692 ": PnP active but chip not configured! " 1692 ": PnP active but chip not configured! "
1693 "You probably have a buggy BIOS. " 1693 "You probably have a buggy BIOS. "
1694 "Configuring chip manually.\n"); 1694 "Configuring chip manually.\n");
@@ -1720,7 +1720,7 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
1720 1720
1721 mmc_add_host(mmc); 1721 mmc_add_host(mmc);
1722 1722
1723 pr_info("%s: W83L51xD", mmc_hostname(mmc)); 1723 printk(KERN_INFO "%s: W83L51xD", mmc_hostname(mmc));
1724 if (host->chip_id != 0) 1724 if (host->chip_id != 0)
1725 printk(" id %x", (int)host->chip_id); 1725 printk(" id %x", (int)host->chip_id);
1726 printk(" at 0x%x irq %d", (int)host->base, (int)host->irq); 1726 printk(" at 0x%x irq %d", (int)host->base, (int)host->irq);
@@ -1735,7 +1735,7 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
1735 return 0; 1735 return 0;
1736} 1736}
1737 1737
1738static void wbsd_shutdown(struct device *dev, int pnp) 1738static void __devexit wbsd_shutdown(struct device *dev, int pnp)
1739{ 1739{
1740 struct mmc_host *mmc = dev_get_drvdata(dev); 1740 struct mmc_host *mmc = dev_get_drvdata(dev);
1741 struct wbsd_host *host; 1741 struct wbsd_host *host;
@@ -1762,13 +1762,13 @@ static void wbsd_shutdown(struct device *dev, int pnp)
1762 * Non-PnP 1762 * Non-PnP
1763 */ 1763 */
1764 1764
1765static int 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, param_io, param_irq, param_dma, 0); 1768 return wbsd_init(&dev->dev, param_io, param_irq, param_dma, 0);
1769} 1769}
1770 1770
1771static int wbsd_remove(struct platform_device *dev) 1771static int __devexit wbsd_remove(struct platform_device *dev)
1772{ 1772{
1773 wbsd_shutdown(&dev->dev, 0); 1773 wbsd_shutdown(&dev->dev, 0);
1774 1774
@@ -1781,7 +1781,7 @@ static int wbsd_remove(struct platform_device *dev)
1781 1781
1782#ifdef CONFIG_PNP 1782#ifdef CONFIG_PNP
1783 1783
1784static int 1784static int __devinit
1785wbsd_pnp_probe(struct pnp_dev *pnpdev, const struct pnp_device_id *dev_id) 1785wbsd_pnp_probe(struct pnp_dev *pnpdev, const struct pnp_device_id *dev_id)
1786{ 1786{
1787 int io, irq, dma; 1787 int io, irq, dma;
@@ -1801,7 +1801,7 @@ wbsd_pnp_probe(struct pnp_dev *pnpdev, const struct pnp_device_id *dev_id)
1801 return wbsd_init(&pnpdev->dev, io, irq, dma, 1); 1801 return wbsd_init(&pnpdev->dev, io, irq, dma, 1);
1802} 1802}
1803 1803
1804static void wbsd_pnp_remove(struct pnp_dev *dev) 1804static void __devexit wbsd_pnp_remove(struct pnp_dev *dev)
1805{ 1805{
1806 wbsd_shutdown(&dev->dev, 1); 1806 wbsd_shutdown(&dev->dev, 1);
1807} 1807}
@@ -1909,7 +1909,7 @@ static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
1909 */ 1909 */
1910 if (host->config != 0) { 1910 if (host->config != 0) {
1911 if (!wbsd_chip_validate(host)) { 1911 if (!wbsd_chip_validate(host)) {
1912 pr_warning(DRIVER_NAME 1912 printk(KERN_WARNING DRIVER_NAME
1913 ": PnP active but chip not configured! " 1913 ": PnP active but chip not configured! "
1914 "You probably have a buggy BIOS. " 1914 "You probably have a buggy BIOS. "
1915 "Configuring chip manually.\n"); 1915 "Configuring chip manually.\n");
@@ -1941,7 +1941,7 @@ static struct platform_device *wbsd_device;
1941 1941
1942static struct platform_driver wbsd_driver = { 1942static struct platform_driver wbsd_driver = {
1943 .probe = wbsd_probe, 1943 .probe = wbsd_probe,
1944 .remove = wbsd_remove, 1944 .remove = __devexit_p(wbsd_remove),
1945 1945
1946 .suspend = wbsd_platform_suspend, 1946 .suspend = wbsd_platform_suspend,
1947 .resume = wbsd_platform_resume, 1947 .resume = wbsd_platform_resume,
@@ -1957,7 +1957,7 @@ static struct pnp_driver wbsd_pnp_driver = {
1957 .name = DRIVER_NAME, 1957 .name = DRIVER_NAME,
1958 .id_table = pnp_dev_table, 1958 .id_table = pnp_dev_table,
1959 .probe = wbsd_pnp_probe, 1959 .probe = wbsd_pnp_probe,
1960 .remove = wbsd_pnp_remove, 1960 .remove = __devexit_p(wbsd_pnp_remove),
1961 1961
1962 .suspend = wbsd_pnp_suspend, 1962 .suspend = wbsd_pnp_suspend,
1963 .resume = wbsd_pnp_resume, 1963 .resume = wbsd_pnp_resume,
@@ -1973,9 +1973,9 @@ static int __init wbsd_drv_init(void)
1973{ 1973{
1974 int result; 1974 int result;
1975 1975
1976 pr_info(DRIVER_NAME 1976 printk(KERN_INFO DRIVER_NAME
1977 ": Winbond W83L51xD SD/MMC card interface driver\n"); 1977 ": Winbond W83L51xD SD/MMC card interface driver\n");
1978 pr_info(DRIVER_NAME ": Copyright(c) Pierre Ossman\n"); 1978 printk(KERN_INFO DRIVER_NAME ": Copyright(c) Pierre Ossman\n");
1979 1979
1980#ifdef CONFIG_PNP 1980#ifdef CONFIG_PNP
1981 1981