diff options
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/of_mmc_spi.c | 5 | ||||
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 6 | ||||
-rw-r--r-- | drivers/mmc/host/sh_mobile_sdhi.c | 5 | ||||
-rw-r--r-- | drivers/mmc/host/tmio_mmc_pio.c | 4 | ||||
-rw-r--r-- | drivers/mmc/host/vub300.c | 11 |
5 files changed, 17 insertions, 14 deletions
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index e2aecb7f1d5c..ab66f2454dc4 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c | |||
@@ -25,6 +25,11 @@ | |||
25 | #include <linux/mmc/core.h> | 25 | #include <linux/mmc/core.h> |
26 | #include <linux/mmc/host.h> | 26 | #include <linux/mmc/host.h> |
27 | 27 | ||
28 | /* For archs that don't support NO_IRQ (such as mips), provide a dummy value */ | ||
29 | #ifndef NO_IRQ | ||
30 | #define NO_IRQ 0 | ||
31 | #endif | ||
32 | |||
28 | MODULE_LICENSE("GPL"); | 33 | MODULE_LICENSE("GPL"); |
29 | 34 | ||
30 | enum { | 35 | enum { |
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 5b2e2155b413..dedf3dab8a3b 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -429,7 +429,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
429 | return -EINVAL; | 429 | return -EINVAL; |
430 | } | 430 | } |
431 | } | 431 | } |
432 | mmc_slot(host).ocr_mask = mmc_regulator_get_ocrmask(reg); | ||
433 | 432 | ||
434 | /* Allow an aux regulator */ | 433 | /* Allow an aux regulator */ |
435 | reg = regulator_get(host->dev, "vmmc_aux"); | 434 | reg = regulator_get(host->dev, "vmmc_aux"); |
@@ -962,7 +961,8 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno) | |||
962 | spin_unlock(&host->irq_lock); | 961 | spin_unlock(&host->irq_lock); |
963 | 962 | ||
964 | if (host->use_dma && dma_ch != -1) { | 963 | if (host->use_dma && dma_ch != -1) { |
965 | dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, | 964 | dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, |
965 | host->data->sg_len, | ||
966 | omap_hsmmc_get_dma_dir(host, host->data)); | 966 | omap_hsmmc_get_dma_dir(host, host->data)); |
967 | omap_free_dma(dma_ch); | 967 | omap_free_dma(dma_ch); |
968 | } | 968 | } |
@@ -1346,7 +1346,7 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data) | |||
1346 | return; | 1346 | return; |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, | 1349 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, |
1350 | omap_hsmmc_get_dma_dir(host, data)); | 1350 | omap_hsmmc_get_dma_dir(host, data)); |
1351 | 1351 | ||
1352 | req_in_progress = host->req_in_progress; | 1352 | req_in_progress = host->req_in_progress; |
diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index b3654293017b..ce500f03df85 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c | |||
@@ -92,7 +92,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
92 | mmc_data->ocr_mask = p->tmio_ocr_mask; | 92 | mmc_data->ocr_mask = p->tmio_ocr_mask; |
93 | mmc_data->capabilities |= p->tmio_caps; | 93 | mmc_data->capabilities |= p->tmio_caps; |
94 | 94 | ||
95 | if (p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) { | 95 | if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) { |
96 | priv->param_tx.slave_id = p->dma_slave_tx; | 96 | priv->param_tx.slave_id = p->dma_slave_tx; |
97 | priv->param_rx.slave_id = p->dma_slave_rx; | 97 | priv->param_rx.slave_id = p->dma_slave_rx; |
98 | priv->dma_priv.chan_priv_tx = &priv->param_tx; | 98 | priv->dma_priv.chan_priv_tx = &priv->param_tx; |
@@ -165,13 +165,14 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev) | |||
165 | 165 | ||
166 | p->pdata = NULL; | 166 | p->pdata = NULL; |
167 | 167 | ||
168 | tmio_mmc_host_remove(host); | ||
169 | |||
168 | for (i = 0; i < 3; i++) { | 170 | for (i = 0; i < 3; i++) { |
169 | irq = platform_get_irq(pdev, i); | 171 | irq = platform_get_irq(pdev, i); |
170 | if (irq >= 0) | 172 | if (irq >= 0) |
171 | free_irq(irq, host); | 173 | free_irq(irq, host); |
172 | } | 174 | } |
173 | 175 | ||
174 | tmio_mmc_host_remove(host); | ||
175 | clk_disable(priv->clk); | 176 | clk_disable(priv->clk); |
176 | clk_put(priv->clk); | 177 | clk_put(priv->clk); |
177 | kfree(priv); | 178 | kfree(priv); |
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index ad6347bb02dd..0b09e8239aa0 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c | |||
@@ -824,8 +824,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) | |||
824 | struct tmio_mmc_host *host = mmc_priv(mmc); | 824 | struct tmio_mmc_host *host = mmc_priv(mmc); |
825 | struct tmio_mmc_data *pdata = host->pdata; | 825 | struct tmio_mmc_data *pdata = host->pdata; |
826 | 826 | ||
827 | return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || | 827 | return !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || |
828 | !(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); | 828 | (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); |
829 | } | 829 | } |
830 | 830 | ||
831 | static int tmio_mmc_get_cd(struct mmc_host *mmc) | 831 | static int tmio_mmc_get_cd(struct mmc_host *mmc) |
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c index cbb03305b77b..d4455ffbefd8 100644 --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c | |||
@@ -2096,7 +2096,7 @@ static struct mmc_host_ops vub300_mmc_ops = { | |||
2096 | static int vub300_probe(struct usb_interface *interface, | 2096 | static int vub300_probe(struct usb_interface *interface, |
2097 | const struct usb_device_id *id) | 2097 | const struct usb_device_id *id) |
2098 | { /* NOT irq */ | 2098 | { /* NOT irq */ |
2099 | struct vub300_mmc_host *vub300 = NULL; | 2099 | struct vub300_mmc_host *vub300; |
2100 | struct usb_host_interface *iface_desc; | 2100 | struct usb_host_interface *iface_desc; |
2101 | struct usb_device *udev = usb_get_dev(interface_to_usbdev(interface)); | 2101 | struct usb_device *udev = usb_get_dev(interface_to_usbdev(interface)); |
2102 | int i; | 2102 | int i; |
@@ -2118,23 +2118,20 @@ static int vub300_probe(struct usb_interface *interface, | |||
2118 | command_out_urb = usb_alloc_urb(0, GFP_KERNEL); | 2118 | command_out_urb = usb_alloc_urb(0, GFP_KERNEL); |
2119 | if (!command_out_urb) { | 2119 | if (!command_out_urb) { |
2120 | retval = -ENOMEM; | 2120 | retval = -ENOMEM; |
2121 | dev_err(&vub300->udev->dev, | 2121 | dev_err(&udev->dev, "not enough memory for command_out_urb\n"); |
2122 | "not enough memory for the command_out_urb\n"); | ||
2123 | goto error0; | 2122 | goto error0; |
2124 | } | 2123 | } |
2125 | command_res_urb = usb_alloc_urb(0, GFP_KERNEL); | 2124 | command_res_urb = usb_alloc_urb(0, GFP_KERNEL); |
2126 | if (!command_res_urb) { | 2125 | if (!command_res_urb) { |
2127 | retval = -ENOMEM; | 2126 | retval = -ENOMEM; |
2128 | dev_err(&vub300->udev->dev, | 2127 | dev_err(&udev->dev, "not enough memory for command_res_urb\n"); |
2129 | "not enough memory for the command_res_urb\n"); | ||
2130 | goto error1; | 2128 | goto error1; |
2131 | } | 2129 | } |
2132 | /* this also allocates memory for our VUB300 mmc host device */ | 2130 | /* this also allocates memory for our VUB300 mmc host device */ |
2133 | mmc = mmc_alloc_host(sizeof(struct vub300_mmc_host), &udev->dev); | 2131 | mmc = mmc_alloc_host(sizeof(struct vub300_mmc_host), &udev->dev); |
2134 | if (!mmc) { | 2132 | if (!mmc) { |
2135 | retval = -ENOMEM; | 2133 | retval = -ENOMEM; |
2136 | dev_err(&vub300->udev->dev, | 2134 | dev_err(&udev->dev, "not enough memory for the mmc_host\n"); |
2137 | "not enough memory for the mmc_host\n"); | ||
2138 | goto error4; | 2135 | goto error4; |
2139 | } | 2136 | } |
2140 | /* MMC core transfer sizes tunable parameters */ | 2137 | /* MMC core transfer sizes tunable parameters */ |