summaryrefslogtreecommitdiffstats
path: root/drivers/input/rmi4/rmi_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/rmi4/rmi_spi.c')
-rw-r--r--drivers/input/rmi4/rmi_spi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/input/rmi4/rmi_spi.c b/drivers/input/rmi4/rmi_spi.c
index c82edda66b23..852aeb0b2c07 100644
--- a/drivers/input/rmi4/rmi_spi.c
+++ b/drivers/input/rmi4/rmi_spi.c
@@ -447,7 +447,6 @@ static int rmi_spi_probe(struct spi_device *spi)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int rmi_spi_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
@@ -473,9 +472,7 @@ static int rmi_spi_resume(struct device *dev)
return ret;
}
-#endif
-#ifdef CONFIG_PM
static int rmi_spi_runtime_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
@@ -501,16 +498,14 @@ static int rmi_spi_runtime_resume(struct device *dev)
return 0;
}
-#endif
static const struct dev_pm_ops rmi_spi_pm = {
- SET_SYSTEM_SLEEP_PM_OPS(rmi_spi_suspend, rmi_spi_resume)
- SET_RUNTIME_PM_OPS(rmi_spi_runtime_suspend, rmi_spi_runtime_resume,
- NULL)
+ SYSTEM_SLEEP_PM_OPS(rmi_spi_suspend, rmi_spi_resume)
+ RUNTIME_PM_OPS(rmi_spi_runtime_suspend, rmi_spi_runtime_resume, NULL)
};
static const struct spi_device_id rmi_id[] = {
- { "rmi4_spi", 0 },
+ { "rmi4-spi", 0 },
{ }
};
MODULE_DEVICE_TABLE(spi, rmi_id);
@@ -518,7 +513,7 @@ MODULE_DEVICE_TABLE(spi, rmi_id);
static struct spi_driver rmi_spi_driver = {
.driver = {
.name = "rmi4_spi",
- .pm = &rmi_spi_pm,
+ .pm = pm_ptr(&rmi_spi_pm),
.of_match_table = of_match_ptr(rmi_spi_of_match),
},
.id_table = rmi_id,