linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata()
@ 2017-02-07 15:56 Wei Yongjun
  2017-02-08  3:19 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2017-02-07 15:56 UTC (permalink / raw)
  To: Markus Mayer, Rafael J. Wysocki, Viresh Kumar, Brian Norris,
	Gregory Fong, Florian Fainelli
  Cc: bcm-kernel-feedback-list, Wei Yongjun, linux-arm-kernel, linux-pm

From: Wei Yongjun <weiyongjun1@huawei.com>

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.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/cpufreq/brcmstb-avs-cpufreq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
index c943606..7281a2c 100644
--- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
+++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
@@ -878,7 +878,6 @@ static int brcm_avs_prepare_init(struct platform_device *pdev)
 	iounmap(priv->avs_intr_base);
 unmap_base:
 	iounmap(priv->base);
-	platform_set_drvdata(pdev, NULL);
 
 	return ret;
 }
@@ -1042,7 +1041,6 @@ static int brcm_avs_cpufreq_remove(struct platform_device *pdev)
 	priv = platform_get_drvdata(pdev);
 	iounmap(priv->base);
 	iounmap(priv->avs_intr_base);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-08  3:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-07 15:56 [PATCH -next] cpufreq: brcmstb-avs-cpufreq: remove unnecessary platform_set_drvdata() Wei Yongjun
2017-02-08  3:19 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).