Skip to content

Commit

Permalink
platform: x86: remove unnecessary platform_set_drvdata()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Matthew Garrett committed Sep 5, 2013
1 parent 0be18a8 commit 18a0393
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion drivers/platform/x86/compal-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,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);
Expand Down
1 change: 0 additions & 1 deletion drivers/platform/x86/intel_mid_powerbtn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/platform/x86/intel_mid_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 18a0393

Please sign in to comment.