aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/lm8323.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/keyboard/lm8323.c')
-rw-r--r--drivers/input/keyboard/lm8323.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c
index 60ac4684f875..bc696931fed7 100644
--- a/drivers/input/keyboard/lm8323.c
+++ b/drivers/input/keyboard/lm8323.c
@@ -670,8 +670,6 @@ static int __devinit lm8323_probe(struct i2c_client *client,
670 goto fail1; 670 goto fail1;
671 } 671 }
672 672
673 i2c_set_clientdata(client, lm);
674
675 lm->client = client; 673 lm->client = client;
676 lm->idev = idev; 674 lm->idev = idev;
677 mutex_init(&lm->lock); 675 mutex_init(&lm->lock);
@@ -753,6 +751,8 @@ static int __devinit lm8323_probe(struct i2c_client *client,
753 goto fail4; 751 goto fail4;
754 } 752 }
755 753
754 i2c_set_clientdata(client, lm);
755
756 device_init_wakeup(&client->dev, 1); 756 device_init_wakeup(&client->dev, 1);
757 enable_irq_wake(client->irq); 757 enable_irq_wake(client->irq);
758 758
@@ -778,6 +778,8 @@ static int __devexit lm8323_remove(struct i2c_client *client)
778 struct lm8323_chip *lm = i2c_get_clientdata(client); 778 struct lm8323_chip *lm = i2c_get_clientdata(client);
779 int i; 779 int i;
780 780
781 i2c_set_clientdata(client, NULL);
782
781 disable_irq_wake(client->irq); 783 disable_irq_wake(client->irq);
782 free_irq(client->irq, lm); 784 free_irq(client->irq, lm);
783 cancel_work_sync(&lm->work); 785 cancel_work_sync(&lm->work);