summaryrefslogtreecommitdiff
path: root/drivers/input/misc/adxl34x-spi.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-01 09:07:33 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-07-03 13:13:21 -0700
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)
}
#ifdef CONFIG_PM
-static int adxl34x_suspend(struct spi_device *spi, pm_message_t message)
+static int adxl34x_spi_suspend(struct spi_device *spi, pm_message_t message)
{
struct adxl34x *ac = dev_get_drvdata(&spi->dev);
- adxl34x_disable(ac);
+ adxl34x_suspend(ac);
return 0;
}
-static int adxl34x_resume(struct spi_device *spi)
+static int adxl34x_spi_resume(struct spi_device *spi)
{
struct adxl34x *ac = dev_get_drvdata(&spi->dev);
- adxl34x_enable(ac);
+ adxl34x_resume(ac);
return 0;
}
#else
-# define adxl34x_suspend NULL
-# define adxl34x_resume NULL
+# define adxl34x_spi_suspend NULL
+# define adxl34x_spi_resume NULL
#endif
static struct spi_driver adxl34x_driver = {
@@ -124,8 +124,8 @@ static struct spi_driver adxl34x_driver = {
},
.probe = adxl34x_spi_probe,
.remove = __devexit_p(adxl34x_spi_remove),
- .suspend = adxl34x_suspend,
- .resume = adxl34x_resume,
+ .suspend = adxl34x_spi_suspend,
+ .resume = adxl34x_spi_resume,
};
static int __init adxl34x_spi_init(void)