aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-07-30 12:05:13 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-07-30 12:18:57 -0700
commit52db9819ac96b0c5a4e075d836cf21dc529cbce4 (patch)
tree472b517df553cd4033cda36bbd34acd386a88c98 /drivers/input
parent3f27757a1182f5e3feff7425b1c3e43f3e466724 (diff)
downloadkernel_goldelico_gta04-52db9819ac96b0c5a4e075d836cf21dc529cbce4.zip
kernel_goldelico_gta04-52db9819ac96b0c5a4e075d836cf21dc529cbce4.tar.gz
kernel_goldelico_gta04-52db9819ac96b0c5a4e075d836cf21dc529cbce4.tar.bz2
Input: lm8323 - add missing device_remove_file for dev_attr_time
Add missing device_remove_file() for dev_attr_time in lm8323_remove(). Also calling device_remove_file() in lm8323_probe() error path to remove sysfs attribute file. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/lm8323.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
index ab0acaf..756348a 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
@@ -754,8 +754,11 @@ fail3:
device_remove_file(&client->dev, &dev_attr_disable_kp);
fail2:
while (--pwm >= 0)
- if (lm->pwm[pwm].enabled)
+ if (lm->pwm[pwm].enabled) {
+ device_remove_file(lm->pwm[pwm].cdev.dev,
+ &dev_attr_time);
led_classdev_unregister(&lm->pwm[pwm].cdev);
+ }
fail1:
input_free_device(idev);
kfree(lm);
@@ -775,8 +778,10 @@ static int __devexit lm8323_remove(struct i2c_client *client)
device_remove_file(&lm->client->dev, &dev_attr_disable_kp);
for (i = 0; i < 3; i++)
- if (lm->pwm[i].enabled)
+ if (lm->pwm[i].enabled) {
+ device_remove_file(lm->pwm[i].cdev.dev, &dev_attr_time);
led_classdev_unregister(&lm->pwm[i].cdev);
+ }
kfree(lm);