hwmon: (k10temp) remove unnecessary pci_set_drvdata()
Subsystems (2)
PATCH 1/1 hwmon: (k10temp) remove unnecessary pci_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/hwmon/k10temp.c | 1 - 1 file changed, 1 deletion(-)
drivers/hwmon/k10temp.c +0 -1
@@ -202,7 +202,6 @@ static void k10temp_remove(struct pci_dev *pdev) &sensor_dev_attr_temp1_crit.dev_attr);device_remove_file (&pdev->dev, &sensor_dev_attr_temp1_crit_hyst.dev_attr); -pci_set_drvdata (pdev,NULL ); }static DEFINE_PCI_DEVICE_TABLE (k10temp_id_table) = {
Signature · 8 lines
1.7.10.4 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 5 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
Quoted 9 lines
--- drivers/hwmon/k10temp.c | 1 - 1 file changed, 1 deletion(-)drivers/hwmon/k10temp.c +0
-0
drivers/hwmon/k10temp.c static void k10temp_remove(struct pci_dev *pdev) · line 207
Quoted 7 lines
drivers/hwmon/k10temp.c +0
-1@@ -202,7 +202,6 @@ static void k10temp_remove(struct pci_dev *pdev) &sensor_dev_attr_temp1_crit.dev_attr);device_remove_file (&pdev->dev, &sensor_dev_attr_temp1_crit_hyst.dev_attr); -pci_set_drvdata (pdev,NULL ); }static DEFINE_PCI_DEVICE_TABLE (k10temp_id_table) = {
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 5 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors