aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-08-21 22:04:28 -0400
committerMatthew Garrett <matthew.garrett@nebula.com>2013-09-05 08:52:18 -0400
commit18a0393543fa3b04278cce235d3d76a13c877b94 (patch)
tree2e21759f2cd60e21e1bd7f89c26d85e193b977af /drivers/platform
parent0be18a8e1133fc2cf668c90360fcd1a767f64faa (diff)
platform: x86: 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. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/compal-laptop.c1
-rw-r--r--drivers/platform/x86/intel_mid_powerbtn.c1
-rw-r--r--drivers/platform/x86/intel_mid_thermal.c1
3 files changed, 0 insertions, 3 deletions
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 52f89fc1325f..eaa78edb1f4e 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -1083,7 +1083,6 @@ static int compal_remove(struct platform_device *pdev)
1083 hwmon_device_unregister(data->hwmon_dev); 1083 hwmon_device_unregister(data->hwmon_dev);
1084 power_supply_unregister(&data->psy); 1084 power_supply_unregister(&data->psy);
1085 1085
1086 platform_set_drvdata(pdev, NULL);
1087 kfree(data); 1086 kfree(data);
1088 1087
1089 sysfs_remove_group(&pdev->dev.kobj, &compal_attribute_group); 1088 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 f59683aa13d5..6b18aba82cfa 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)
128 128
129 free_irq(irq, input); 129 free_irq(irq, input);
130 input_unregister_device(input); 130 input_unregister_device(input);
131 platform_set_drvdata(pdev, NULL);
132 131
133 return 0; 132 return 0;
134} 133}
diff --git a/drivers/platform/x86/intel_mid_thermal.c b/drivers/platform/x86/intel_mid_thermal.c
index 81c491e74b34..93fab8b70ce1 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)
542 } 542 }
543 543
544 kfree(pinfo); 544 kfree(pinfo);
545 platform_set_drvdata(pdev, NULL);
546 545
547 /* Stop the ADC */ 546 /* Stop the ADC */
548 return configure_adc(0); 547 return configure_adc(0);