Skip to contentSkip to conversation

mmc: sdhci: remove unnecessary platform_set_drvdata() call

PATCH Applied Jisheng Zhang 3 participants 6 messages Mar 10, 2017 – Mar 16, 2017

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

cover mmc: sdhci: remove unnecessary platform_set_drvdata() call

sdhci_pltfm_init() has already set the platform drvdata for us, so its users doesn't need to set the drvdata again. These patches clean up all unnecessary platform_set_drvdata() call.

Jisheng Zhang (3):
mmc: sdhci-pxav3: remove unnecessary platform_set_drvdata() call
mmc: sdhci-pxav2: remove unnecessary platform_set_drvdata() call
mmc: sdhci-st: remove unnecessary platform_set_drvdata() call

 drivers/mmc/host/sdhci-pxav2.c | 2 --
 drivers/mmc/host/sdhci-pxav3.c | 2 --
 drivers/mmc/host/sdhci-st.c    | 2 --
 3 files changed, 6 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/3 mmc: sdhci-pxav3: remove unnecessary platform_set_drvdata() call

sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call.

---
 drivers/mmc/host/sdhci-pxav3.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-pxav3.c +0 -2
index d0f5c05fbc19..132670a612a0 100644
@@ -480,8 +480,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 		goto err_add_host;
 	}
 
-	platform_set_drvdata(pdev, host);
-
 	if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
 		device_init_wakeup(&pdev->dev, 1);
 
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/3 mmc: sdhci-pxav2: remove unnecessary platform_set_drvdata() call

In reply to Jisheng Zhang

sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call.

---
 drivers/mmc/host/sdhci-pxav2.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-pxav2.c +0 -2
index 347eae2d7b6a..74e21ad699e0 100644
@@ -222,8 +222,6 @@ static int sdhci_pxav2_probe(struct platform_device *pdev)
 		goto err_add_host;
 	}
 
-	platform_set_drvdata(pdev, host);
-
 	return 0;
 
 err_add_host:
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/3 mmc: sdhci-st: remove unnecessary platform_set_drvdata() call

In reply to Jisheng Zhang

sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call.

---
 drivers/mmc/host/sdhci-st.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-st.c +0 -2
index ed92ce729dde..7fff6490855c 100644
@@ -418,8 +418,6 @@ static int sdhci_st_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	platform_set_drvdata(pdev, host);
-
 	host_version = readw_relaxed((host->ioaddr + SDHCI_HOST_VERSION));
 
 	dev_info(&pdev->dev, "SDHCI ST Initialised: Host Version: 0x%x Vendor Version 0x%x\n",
Signature · 1 line
2.11.0
Acked-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] mmc: sdhci-st: remove unnecessary platform_set_drvdata() call

Hi Jisheng

Quoted 14 lines · Jisheng Zhang

sdhci_pltfm_init() has already set the platform drvdata for us, remove the unnecessary platform_set_drvdata() call.

---
 drivers/mmc/host/sdhci-st.c | 2 --
 1 file changed, 2 deletions(-)
drivers/mmc/host/sdhci-st.c +0 -0
index ed92ce729dde..7fff6490855c 100644

drivers/mmc/host/sdhci-st.c static int sdhci_st_probe(struct platform_device *pdev) · line 423

Quoted 8 lines
drivers/mmc/host/sdhci-st.c +0 -2
@@ -418,8 +418,6 @@ static int sdhci_st_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
-	platform_set_drvdata(pdev, host);
-
 	host_version = readw_relaxed((host->ioaddr + SDHCI_HOST_VERSION));
 
 	dev_info(&pdev->dev, "SDHCI ST Initialised: Host Version: 0x%x Vendor Version 0x%x\n",

Thanks

Applied
#5 lore raw
In reply to Jisheng Zhang
Quoted 9 lines · Jisheng Zhang

sdhci_pltfm_init() has already set the platform drvdata for us, so its users doesn't need to set the drvdata again. These patches clean up all unnecessary platform_set_drvdata() call.

Jisheng Zhang (3):
mmc: sdhci-pxav3: remove unnecessary platform_set_drvdata() call
mmc: sdhci-pxav2: remove unnecessary platform_set_drvdata() call
mmc: sdhci-st: remove unnecessary platform_set_drvdata() call

Quoted 8 lines
 drivers/mmc/host/sdhci-pxav2.c | 2 --
 drivers/mmc/host/sdhci-pxav3.c | 2 --
 drivers/mmc/host/sdhci-st.c    | 2 --
 3 files changed, 6 deletions(-)

--
2.11.0

Thanks, applied for next!

Kind regards
Uffe