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:
ac63ff5
)
leds: convert PCA9633 LED driver to devm_kzalloc()
author
Bryan Wu
<bryan.wu@canonical.com>
Wed, 4 Jul 2012 03:40:10 +0000
(11:40 +0800)
committer
Bryan Wu
<bryan.wu@canonical.com>
Mon, 23 Jul 2012 23:52:38 +0000
(07:52 +0800)
Cc: Peter Meerwald <p.meerwald@bct-electronic.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
drivers/leds/leds-pca9633.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/leds/leds-pca9633.c
b/drivers/leds/leds-pca9633.c
index d8926fd031aa938f6e6e95c8713ebe63b6c596db..edcd706c5631f1024b305821a95857996260f593 100644
(file)
--- a/
drivers/leds/leds-pca9633.c
+++ b/
drivers/leds/leds-pca9633.c
@@
-108,7
+108,7
@@
static int __devinit pca9633_probe(struct i2c_client *client,
}
}
- pca9633 =
kcalloc(4,
sizeof(*pca9633), GFP_KERNEL);
+ pca9633 =
devm_kzalloc(&client->dev, 4 *
sizeof(*pca9633), GFP_KERNEL);
if (!pca9633)
return -ENOMEM;
@@
-156,8
+156,6
@@
exit:
cancel_work_sync(&pca9633[i].work);
}
- kfree(pca9633);
-
return err;
}
@@
-171,8
+169,6
@@
static int __devexit pca9633_remove(struct i2c_client *client)
cancel_work_sync(&pca9633[i].work);
}
- kfree(pca9633);
-
return 0;
}