aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 3b4bc54df695..e75b1bf6df12 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1244,8 +1244,8 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
1244 if (ret) 1244 if (ret)
1245 goto fail_free_io; 1245 goto fail_free_io;
1246 1246
1247 ret = request_irq(IRQ_NAND, pxa3xx_nand_irq, IRQF_DISABLED, 1247 ret = request_irq(irq, pxa3xx_nand_irq, IRQF_DISABLED,
1248 pdev->name, info); 1248 pdev->name, info);
1249 if (ret < 0) { 1249 if (ret < 0) {
1250 dev_err(&pdev->dev, "failed to request IRQ\n"); 1250 dev_err(&pdev->dev, "failed to request IRQ\n");
1251 goto fail_free_buf; 1251 goto fail_free_buf;
@@ -1271,7 +1271,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
1271 return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); 1271 return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts);
1272 1272
1273fail_free_irq: 1273fail_free_irq:
1274 free_irq(IRQ_NAND, info); 1274 free_irq(irq, info);
1275fail_free_buf: 1275fail_free_buf:
1276 if (use_dma) { 1276 if (use_dma) {
1277 pxa_free_dma(info->data_dma_ch); 1277 pxa_free_dma(info->data_dma_ch);
@@ -1296,12 +1296,15 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
1296 struct mtd_info *mtd = platform_get_drvdata(pdev); 1296 struct mtd_info *mtd = platform_get_drvdata(pdev);
1297 struct pxa3xx_nand_info *info = mtd->priv; 1297 struct pxa3xx_nand_info *info = mtd->priv;
1298 struct resource *r; 1298 struct resource *r;
1299 int irq;
1299 1300
1300 platform_set_drvdata(pdev, NULL); 1301 platform_set_drvdata(pdev, NULL);
1301 1302
1302 del_mtd_device(mtd); 1303 del_mtd_device(mtd);
1303 del_mtd_partitions(mtd); 1304 del_mtd_partitions(mtd);
1304 free_irq(IRQ_NAND, info); 1305 irq = platform_get_irq(pdev, 0);
1306 if (irq >= 0)
1307 free_irq(irq, info);
1305 if (use_dma) { 1308 if (use_dma) {
1306 pxa_free_dma(info->data_dma_ch); 1309 pxa_free_dma(info->data_dma_ch);
1307 dma_free_writecombine(&pdev->dev, info->data_buff_size, 1310 dma_free_writecombine(&pdev->dev, info->data_buff_size,