X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fspi%2Fomap2_mcspi.c;h=f6f987bb71ca39413192c0a3de0e8f2a2ac2e6a0;hb=f1b134fdf6d36c975b4a66cf952565cd73aebdba;hp=a6ba11afb03f798bb7f8520c352b419ff6bb119d;hpb=ccc7baed1868efd02dac88b32cba4a837a558536;p=linux-2.6-omap-h63xx.git diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index a6ba11afb03..f6f987bb71c 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -836,7 +836,7 @@ static int omap2_mcspi_transfer(struct spi_device *spi, struct spi_message *m) if (tx_buf != NULL) { t->tx_dma = dma_map_single(&spi->dev, (void *) tx_buf, len, DMA_TO_DEVICE); - if (dma_mapping_error(t->tx_dma)) { + if (dma_mapping_error(&spi->dev, t->tx_dma)) { dev_dbg(&spi->dev, "dma %cX %d bytes error\n", 'T', len); return -EINVAL; @@ -845,7 +845,7 @@ static int omap2_mcspi_transfer(struct spi_device *spi, struct spi_message *m) if (rx_buf != NULL) { t->rx_dma = dma_map_single(&spi->dev, rx_buf, t->len, DMA_FROM_DEVICE); - if (dma_mapping_error(t->rx_dma)) { + if (dma_mapping_error(&spi->dev, t->rx_dma)) { dev_dbg(&spi->dev, "dma %cX %d bytes error\n", 'R', len); if (tx_buf != NULL) @@ -1084,6 +1084,9 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev) return 0; } +/* work with hotplug and coldplug */ +MODULE_ALIAS("platform:omap2_mcspi"); + static struct platform_driver omap2_mcspi_driver = { .driver = { .name = "omap2_mcspi",