diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-20 01:27:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-20 01:27:06 -0400 |
commit | a952baa034ae7c2e4a66932005cbc7ebbccfe28d (patch) | |
tree | ff5abe0c77f5b129946300677d9b57b00d926a1e /drivers/input/keyboard/lm8323.c | |
parent | 5bab188a316718a26346cdb25c4cc6b319f8f907 (diff) | |
parent | 97eb3f24352ec6632c2127b35d8087d2a809a9b9 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits)
Input: tsc2005 - remove 'disable' sysfs attribute
Input: tsc2005 - add open/close
Input: tsc2005 - handle read errors from SPI layer
Input: tsc2005 - do not rearm timer in hardirq handler
Input: tsc2005 - don't use work for 'pen up' handling
Input: tsc2005 - do not use 0 in place of NULL
Input: tsc2005 - use true/false for boolean variables
Input: tsc2005 - hide selftest attribute if we can't reset
Input: tsc2005 - rework driver initialization code
Input: tsc2005 - set up bus type in input device
Input: tsc2005 - set up parent device
Input: tsc2005 - clear driver data after unbinding
Input: tsc2005 - add module description
Input: tsc2005 - remove driver banner message
Input: tsc2005 - remove incorrect module alias
Input: tsc2005 - convert to using dev_pm_ops
Input: tsc2005 - use spi_get/set_drvdata()
Input: introduce tsc2005 driver
Input: xen-kbdfront - move to drivers/input/misc
Input: xen-kbdfront - add grant reference for shared page
...
Diffstat (limited to 'drivers/input/keyboard/lm8323.c')
-rw-r--r-- | drivers/input/keyboard/lm8323.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index f7c2a166576b..b732870ecc89 100644 --- a/drivers/input/keyboard/lm8323.c +++ b/drivers/input/keyboard/lm8323.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/input.h> | 31 | #include <linux/input.h> |
32 | #include <linux/leds.h> | 32 | #include <linux/leds.h> |
33 | #include <linux/pm.h> | ||
33 | #include <linux/i2c/lm8323.h> | 34 | #include <linux/i2c/lm8323.h> |
34 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
35 | 36 | ||
@@ -802,8 +803,9 @@ static int __devexit lm8323_remove(struct i2c_client *client) | |||
802 | * We don't need to explicitly suspend the chip, as it already switches off | 803 | * We don't need to explicitly suspend the chip, as it already switches off |
803 | * when there's no activity. | 804 | * when there's no activity. |
804 | */ | 805 | */ |
805 | static int lm8323_suspend(struct i2c_client *client, pm_message_t mesg) | 806 | static int lm8323_suspend(struct device *dev) |
806 | { | 807 | { |
808 | struct i2c_client *client = to_i2c_client(dev); | ||
807 | struct lm8323_chip *lm = i2c_get_clientdata(client); | 809 | struct lm8323_chip *lm = i2c_get_clientdata(client); |
808 | int i; | 810 | int i; |
809 | 811 | ||
@@ -821,8 +823,9 @@ static int lm8323_suspend(struct i2c_client *client, pm_message_t mesg) | |||
821 | return 0; | 823 | return 0; |
822 | } | 824 | } |
823 | 825 | ||
824 | static int lm8323_resume(struct i2c_client *client) | 826 | static int lm8323_resume(struct device *dev) |
825 | { | 827 | { |
828 | struct i2c_client *client = to_i2c_client(dev); | ||
826 | struct lm8323_chip *lm = i2c_get_clientdata(client); | 829 | struct lm8323_chip *lm = i2c_get_clientdata(client); |
827 | int i; | 830 | int i; |
828 | 831 | ||
@@ -839,11 +842,10 @@ static int lm8323_resume(struct i2c_client *client) | |||
839 | 842 | ||
840 | return 0; | 843 | return 0; |
841 | } | 844 | } |
842 | #else | ||
843 | #define lm8323_suspend NULL | ||
844 | #define lm8323_resume NULL | ||
845 | #endif | 845 | #endif |
846 | 846 | ||
847 | static SIMPLE_DEV_PM_OPS(lm8323_pm_ops, lm8323_suspend, lm8323_resume); | ||
848 | |||
847 | static const struct i2c_device_id lm8323_id[] = { | 849 | static const struct i2c_device_id lm8323_id[] = { |
848 | { "lm8323", 0 }, | 850 | { "lm8323", 0 }, |
849 | { } | 851 | { } |
@@ -852,11 +854,10 @@ static const struct i2c_device_id lm8323_id[] = { | |||
852 | static struct i2c_driver lm8323_i2c_driver = { | 854 | static struct i2c_driver lm8323_i2c_driver = { |
853 | .driver = { | 855 | .driver = { |
854 | .name = "lm8323", | 856 | .name = "lm8323", |
857 | .pm = &lm8323_pm_ops, | ||
855 | }, | 858 | }, |
856 | .probe = lm8323_probe, | 859 | .probe = lm8323_probe, |
857 | .remove = __devexit_p(lm8323_remove), | 860 | .remove = __devexit_p(lm8323_remove), |
858 | .suspend = lm8323_suspend, | ||
859 | .resume = lm8323_resume, | ||
860 | .id_table = lm8323_id, | 861 | .id_table = lm8323_id, |
861 | }; | 862 | }; |
862 | MODULE_DEVICE_TABLE(i2c, lm8323_id); | 863 | MODULE_DEVICE_TABLE(i2c, lm8323_id); |