X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH] platform: x86: remove unnecessary platform_set_drvdata()
@ 2013-08-22  2:04 Jingoo Han
  2013-09-03 12:45 ` Matthew Garrett
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-08-22  2:04 UTC (permalink / raw)
  To: 'Matthew Garrett'; +Cc: platform-driver-x86, '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.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/platform/x86/compal-laptop.c      |    1 -
 drivers/platform/x86/intel_mid_powerbtn.c |    1 -
 drivers/platform/x86/intel_mid_thermal.c  |    1 -
 3 files changed, 3 deletions(-)

diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 475cc52..634016a 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -1081,7 +1081,6 @@ static int compal_remove(struct platform_device *pdev)
 	hwmon_device_unregister(data->hwmon_dev);
 	power_supply_unregister(&data->psy);
 
-	platform_set_drvdata(pdev, NULL);
 	kfree(data);
 
 	sysfs_remove_group(&pdev->dev.kobj, &compal_attribute_group);
diff --git a/drivers/platform/x86/intel_mid_powerbtn.c b/drivers/platform/x86/intel_mid_powerbtn.c
index f59683a..6b18aba 100644
--- a/drivers/platform/x86/intel_mid_powerbtn.c
+++ b/drivers/platform/x86/intel_mid_powerbtn.c
@@ -128,7 +128,6 @@ static int mfld_pb_remove(struct platform_device *pdev)
 
 	free_irq(irq, input);
 	input_unregister_device(input);
-	platform_set_drvdata(pdev, NULL);
 
 	return 0;
 }
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index 81c491e..93fab8b 100644
--- a/drivers/platform/x86/intel_mid_thermal.c
+++ b/drivers/platform/x86/intel_mid_thermal.c
@@ -542,7 +542,6 @@ static int mid_thermal_remove(struct platform_device *pdev)
 	}
 
 	kfree(pinfo);
-	platform_set_drvdata(pdev, NULL);
 
 	/* Stop the ADC */
 	return configure_adc(0);
-- 
1.7.10.4

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

* Re: [PATCH] platform: x86: remove unnecessary platform_set_drvdata()
  2013-08-22  2:04 [PATCH] platform: x86: remove unnecessary platform_set_drvdata() Jingoo Han
@ 2013-09-03 12:45 ` Matthew Garrett
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Garrett @ 2013-09-03 12:45 UTC (permalink / raw)
  To: Jingoo Han; +Cc: platform-driver-x86@vger.kernel.org

On Thu, 2013-08-22 at 11:04 +0900, Jingoo Han wrote:
> 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.

-- 
Matthew Garrett <matthew.garrett@nebula.com>

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

end of thread, other threads:[~2013-09-03 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22  2:04 [PATCH] platform: x86: remove unnecessary platform_set_drvdata() Jingoo Han
2013-09-03 12:45 ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox