Skip to contentSkip to conversation

fpga: dfl: region: Restory symmetry in probe()/remove()

PATCH Superseded Moritz Fischer 2 participants 2 messages Aug 17, 2018 – Aug 18, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Moritz Fischer

author maintainer
#0 lore raw

PATCH 1/1 fpga: dfl: region: Restory symmetry in probe()/remove()

Replace dev_get_drvdata() with platform_get_drvdata() to match the platform_set_drvdata() in the probe function of the platform driver.

Fixes commit bb61b9be3e6b ("fpga: dfl: add fpga region platform driver for FME")

---
 drivers/fpga/dfl-fme-region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/dfl-fme-region.c +1 -1
index 0b7e19c27c6d..ce7ebe4b3212 100644
@@ -65,7 +65,7 @@ static int fme_region_probe(struct platform_device *pdev)
 
 static int fme_region_remove(struct platform_device *pdev)
 {
-	struct fpga_region *region = dev_get_drvdata(&pdev->dev);
+	struct fpga_region *region = platform_get_drvdata(&pdev->dev);
 
 	fpga_region_unregister(region);
 	fpga_mgr_put(region->mgr);
Signature · 1 line
2.18.0
#1 lore raw
Quoted 16 lines · Moritz Fischer

Replace dev_get_drvdata() with platform_get_drvdata() to match the platform_set_drvdata() in the probe function of the platform driver.

Fixes commit bb61b9be3e6b ("fpga: dfl: add fpga region platform driver for FME")

---
 drivers/fpga/dfl-fme-region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/dfl-fme-region.c +0 -0
index 0b7e19c27c6d..ce7ebe4b3212 100644

drivers/fpga/dfl-fme-region.c static int fme_region_probe(struct platform_device *pdev) · line 68

Quoted 5 lines
drivers/fpga/dfl-fme-region.c +1 -1
@@ -65,7 +65,7 @@ static int fme_region_probe(struct platform_device *pdev)
 
 static int fme_region_remove(struct platform_device *pdev)
 {
-       struct fpga_region *region = dev_get_drvdata(&pdev->dev);
+       struct fpga_region *region = platform_get_drvdata(&pdev->dev);

Blergh ... that doesn't even compile. I'll resubmit next week. Sorry for the noise.
Should of course be platform_get_drvdata(pdev);

- Moritz