aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-06-02 11:20:21 -0700
committerGuenter Roeck <linux@roeck-us.net>2012-09-23 21:08:32 -0700
commit9220f1e4a284667a813ca4428fbbd5a3cbc6295d (patch)
treed2824ea6f5dde5da4cc3c43cd3ed1124819eb6a4 /drivers/hwmon
parentbd8d8e088d4ec8738d47141c119013b5e63f591c (diff)
hwmon: (sch5636) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/sch5636.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c
index 96a7e68718c..51711801619 100644
--- a/drivers/hwmon/sch5636.c
+++ b/drivers/hwmon/sch5636.c
@@ -402,9 +402,6 @@ static int sch5636_remove(struct platform_device *pdev)
device_remove_file(&pdev->dev,
&sch5636_fan_attr[i].dev_attr);
- platform_set_drvdata(pdev, NULL);
- kfree(data);
-
return 0;
}
@@ -414,7 +411,8 @@ static int __devinit sch5636_probe(struct platform_device *pdev)
int i, err, val, revision[2];
char id[4];
- data = kzalloc(sizeof(struct sch5636_data), GFP_KERNEL);
+ data = devm_kzalloc(&pdev->dev, sizeof(struct sch5636_data),
+ GFP_KERNEL);
if (!data)
return -ENOMEM;