Skip to contentSkip to conversation

dma: ipu: remove unnecessary platform_set_drvdata()

PATCH Applied Jingoo Han 3 participants 3 messages Aug 21, 2013 – Aug 25, 2013 dmaengine

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 dma: ipu: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.

---
 drivers/dma/ipu/ipu_idmac.c |    1 -
 1 file changed, 1 deletion(-)
drivers/dma/ipu/ipu_idmac.c +0 -1
index 608d4a2..cb9c0bc 100644
@@ -1764,7 +1764,6 @@ static int ipu_remove(struct platform_device *pdev)
 	iounmap(ipu->reg_ic);
 	iounmap(ipu->reg_ipu);
 	tasklet_kill(&ipu->tasklet);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jingoo Han

The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.

Quoted 20 lines
---
 drivers/dma/ipu/ipu_idmac.c |    1 -
 1 file changed, 1 deletion(-)
drivers/dma/ipu/ipu_idmac.c +0 -1
index 608d4a2..cb9c0bc 100644
@@ -1764,7 +1764,6 @@ static int ipu_remove(struct platform_device *pdev)
 	iounmap(ipu->reg_ic);
 	iounmap(ipu->reg_ipu);
 	tasklet_kill(&ipu->tasklet);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }
Signature · 1 line
1.7.10.4
Applied
#2 lore raw
In reply to Jingoo Han
Quoted 3 lines · Jingoo Han

The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.

Applied, thanks

~Vinod