projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd8d8e0
)
hwmon: (sch5636) Convert to use devm_ functions
author
Guenter Roeck
<linux@roeck-us.net>
Sat, 2 Jun 2012 18:20:21 +0000
(11:20 -0700)
committer
Guenter Roeck
<linux@roeck-us.net>
Mon, 24 Sep 2012 04:08:32 +0000
(21:08 -0700)
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/sch5636.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hwmon/sch5636.c
b/drivers/hwmon/sch5636.c
index 96a7e68718cadb8348ea4d7680750ade1d6d143b..5171180161929f207237d4c9ee0b11e9c58116f1 100644
(file)
--- 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;