]> Pileus Git - ~andy/linux/commitdiff
platform: x86: remove unnecessary platform_set_drvdata()
authorJingoo Han <jg1.han@samsung.com>
Thu, 22 Aug 2013 02:04:28 +0000 (11:04 +0900)
committerMatthew Garrett <matthew.garrett@nebula.com>
Thu, 5 Sep 2013 12:52:18 +0000 (08:52 -0400)
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>
drivers/platform/x86/compal-laptop.c
drivers/platform/x86/intel_mid_powerbtn.c
drivers/platform/x86/intel_mid_thermal.c

index 52f89fc1325f8c48178a3dd08ca4a49d20301417..eaa78edb1f4ef2b9f5af80bd0f715dfaa9304bd8 100644 (file)
@@ -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);
index f59683aa13d5d9ce522355ba98eeaa2898f56f01..6b18aba82cfae450bde3cad8fd2b2d01f20b3d03 100644 (file)
@@ -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;
 }
index 81c491e74b3471e5433a8024df690476489a4fdc..93fab8b70ce17dd5b0b811c88807f9adee3f67e0 100644 (file)
@@ -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);