Skip to contentSkip to conversation

clocksource: sh_tmu: remove unnecessary platform_set_drvdata()

PATCH Applied Jingoo Han 2 participants 4 messages Dec 3, 2013 – Dec 4, 2013 Clocksource, clockevent drivers

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/2 clocksource: sh_tmu: 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/clocksource/sh_tmu.c |    1 -
 1 file changed, 1 deletion(-)
drivers/clocksource/sh_tmu.c +0 -1
index 63557cd..e29295e 100644
@@ -523,7 +523,6 @@ static int sh_tmu_probe(struct platform_device *pdev)
 	ret = sh_tmu_setup(p, pdev);
 	if (ret) {
 		kfree(p);
-		platform_set_drvdata(pdev, NULL);
 		pm_runtime_idle(&pdev->dev);
 		return ret;
 	}
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH 2/2 clocksource: sh_mtu2: 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/clocksource/sh_mtu2.c |    1 -
 1 file changed, 1 deletion(-)
drivers/clocksource/sh_mtu2.c +0 -1
index 3cf1283..d8ed6e6 100644
@@ -358,7 +358,6 @@ static int sh_mtu2_probe(struct platform_device *pdev)
 	ret = sh_mtu2_setup(p, pdev);
 	if (ret) {
 		kfree(p);
-		platform_set_drvdata(pdev, NULL);
 		pm_runtime_idle(&pdev->dev);
 		return ret;
 	}
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH 2/2] clocksource: sh_mtu2: remove unnecessary platform_set_drvdata()

Quoted 7 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 to my tree for 3.14

Thanks !

-- Daniel

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#3 lore raw
In reply to Jingoo Han
Quoted 7 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 to my tree for 3.14.

Signature · 5 lines
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog