mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
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>
This commit is contained in:
parent
bd8d8e088d
commit
9220f1e4a2
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue