projects
/
GitHub
/
LineageOS
/
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:
742413a
)
mfd: max8925: Convert to managed resources for allocating memory
author
Lee Jones
<lee.jones@linaro.org>
Thu, 23 May 2013 15:25:17 +0000
(16:25 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 13 Jun 2013 10:11:45 +0000
(12:11 +0200)
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/max8925-i2c.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mfd/max8925-i2c.c
b/drivers/mfd/max8925-i2c.c
index 92bbebd31598815659e667d890a846249b37db8b..8042b3205eaaf450b3a46b2e657bd5445350c8b1 100644
(file)
--- a/
drivers/mfd/max8925-i2c.c
+++ b/
drivers/mfd/max8925-i2c.c
@@
-170,7
+170,8
@@
static int max8925_probe(struct i2c_client *client,
return -EINVAL;
}
- chip = kzalloc(sizeof(struct max8925_chip), GFP_KERNEL);
+ chip = devm_kzalloc(&client->dev,
+ sizeof(struct max8925_chip), GFP_KERNEL);
if (chip == NULL)
return -ENOMEM;
chip->i2c = client;
@@
-199,7
+200,6
@@
static int max8925_remove(struct i2c_client *client)
max8925_device_exit(chip);
i2c_unregister_device(chip->adc);
i2c_unregister_device(chip->rtc);
- kfree(chip);
return 0;
}