aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/adxl34x-spi.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-01 12:07:33 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-03 16:13:21 -0400
commitaf6e1d99ea525161f70f68ecb83d0d0f54f1bf62 (patch)
tree5d805e4e6da3f252bd9b4d8a958b25723970837f /drivers/input/misc/adxl34x-spi.c
parent963ce8ae6dbc7c8dffb1b117ba14673d40b22dda (diff)
Input: adxl34 - make enable/disable separate from suspend/resume
Suspending and resuming the device should be separate from enabling and disabling it through sysfs attribute and thus should not alter ac->disabled flag. [michael.hennerich@analog.com: various fixups] Tested-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/misc/adxl34x-spi.c')
-rw-r--r--drivers/input/misc/adxl34x-spi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
index 7f992353ffdd..782de9e89828 100644
--- a/drivers/input/misc/adxl34x-spi.c
+++ b/drivers/input/misc/adxl34x-spi.c
@@ -94,26 +94,26 @@ static int __devexit adxl34x_spi_remove(struct spi_device *spi)
94} 94}
95 95
96#ifdef CONFIG_PM 96#ifdef CONFIG_PM
97static int adxl34x_suspend(struct spi_device *spi, pm_message_t message) 97static int adxl34x_spi_suspend(struct spi_device *spi, pm_message_t message)
98{ 98{
99 struct adxl34x *ac = dev_get_drvdata(&spi->dev); 99 struct adxl34x *ac = dev_get_drvdata(&spi->dev);
100 100
101 adxl34x_disable(ac); 101 adxl34x_suspend(ac);
102 102
103 return 0; 103 return 0;
104} 104}
105 105
106static int adxl34x_resume(struct spi_device *spi) 106static int adxl34x_spi_resume(struct spi_device *spi)
107{ 107{
108 struct adxl34x *ac = dev_get_drvdata(&spi->dev); 108 struct adxl34x *ac = dev_get_drvdata(&spi->dev);
109 109
110 adxl34x_enable(ac); 110 adxl34x_resume(ac);
111 111
112 return 0; 112 return 0;
113} 113}
114#else 114#else
115# define adxl34x_suspend NULL 115# define adxl34x_spi_suspend NULL
116# define adxl34x_resume NULL 116# define adxl34x_spi_resume NULL
117#endif 117#endif
118 118
119static struct spi_driver adxl34x_driver = { 119static struct spi_driver adxl34x_driver = {
@@ -124,8 +124,8 @@ static struct spi_driver adxl34x_driver = {
124 }, 124 },
125 .probe = adxl34x_spi_probe, 125 .probe = adxl34x_spi_probe,
126 .remove = __devexit_p(adxl34x_spi_remove), 126 .remove = __devexit_p(adxl34x_spi_remove),
127 .suspend = adxl34x_suspend, 127 .suspend = adxl34x_spi_suspend,
128 .resume = adxl34x_resume, 128 .resume = adxl34x_spi_resume,
129}; 129};
130 130
131static int __init adxl34x_spi_init(void) 131static int __init adxl34x_spi_init(void)