Skip to contentSkip to conversation

mmci-omap: free irq resource

PATCH In review [email protected] 2 participants 3 messages Nov 1, 2009 – Nov 18, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmci-omap: free irq resource

Free IRQ on remove.

drivers/mmc/host/omap.c +1 -0
index 5d773b8..5f970e2 100644
@@ -1529,6 +1529,7 @@ static int mmc_omap_remove(struct platform_device *pdev)
 		host->pdata->cleanup(&pdev->dev);
 
 	mmc_omap_fclk_enable(host, 0);
+	free_irq(host->irq, host);
 	clk_put(host->fclk);
 	clk_disable(host->iclk);
 	clk_put(host->iclk);
#1 lore raw
Quoted 10 lines · On Sun, 1 Nov 2009 12:59:05 +0100 [email protected] wrote:

Free IRQ on remove.

drivers/mmc/host/omap.c +0 -0
index 5d773b8..5f970e2 100644

drivers/mmc/host/omap.c static int mmc_omap_remove(struct platform_device *pdev) · line 1535

Quoted 7 lines
drivers/mmc/host/omap.c +1 -0
@@ -1529,6 +1529,7 @@ static int mmc_omap_remove(struct platform_device *pdev)
 		host->pdata->cleanup(&pdev->dev);
 
 	mmc_omap_fclk_enable(host, 0);
+	free_irq(host->irq, host);
 	clk_put(host->fclk);
 	clk_disable(host->iclk);
 	clk_put(host->iclk);

This is a poor changelog.

The reader doesn't know what the implication of the bug is. I _assume_ that it means that the driver can only be loaded a single time. That on a second modprobe, it fails to allocate the interrupt and fails.

In which case this is a fairly serious bug and perhaps the patch should be backported into the -stable tree.

Or I could be all wrong about all of that. This is why it's better if the patch submitter *explains* these things, rather than leaving others to guess.

#2 lore raw
Quoted 15 lines · Andrew Morton
Quoted 12 lines · On Sun, 1 Nov 2009 12:59:05 +0100 [email protected] wrote:

Free IRQ on remove.

drivers/mmc/host/omap.c +0 -0
index 5d773b8..5f970e2 100644
@@ -1529,6 +1529,7 @@ static int mmc_omap_remove(struct platform_device *pdev)
 		host->pdata->cleanup(&pdev->dev);
 
Quoted 7 lines

drivers/mmc/host/omap.c static int mmc_omap_remove(struct platform_device *pdev) · line 1535

Quoted 5 lines
drivers/mmc/host/omap.c +1 -0
 	mmc_omap_fclk_enable(host, 0);
+	free_irq(host->irq, host);
 	clk_put(host->fclk);
 	clk_disable(host->iclk);
 	clk_put(host->iclk);

This is a poor changelog.

I'm sorry for that as well as for sending this patch twice. I will do better next time.

Quoted 3 lines

The reader doesn't know what the implication of the bug is. I _assume_ that it means that the driver can only be loaded a single time. That on a second modprobe, it fails to allocate the interrupt and fails.

This is perfectly correct assumption.

Quoted 2 lines

In which case this is a fairly serious bug and perhaps the patch should be backported into the -stable tree.

There is no point backporting it as this driver is broken for ages without single complain.
(details here: http://article.gmane.org/gmane.linux.kernel.mmc/649)

Quoted 3 lines

Or I could be all wrong about all of that. This is why it's better if the patch submitter *explains* these things, rather than leaving others to guess.

Best regards,
ladis