All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Russell King <linux@arm.linux.org.uk>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH] input: ambakmi: Fix system PM by converting to modern callbacks
Date: Tue, 14 Apr 2015 12:41:48 +0200	[thread overview]
Message-ID: <1429008108-29295-1-git-send-email-ulf.hansson@linaro.org> (raw)

The legacy system PM support has long time ago been dropped from the
AMBA bus. Align to that by converting to the modern system PM
callbacks.

Fixes: 26825cfd90f9 (ARM: 7914/1: amba: Drop legacy PM support ...)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/input/serio/ambakmi.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 8b748d9..058e1d8 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -175,15 +175,19 @@ static int amba_kmi_remove(struct amba_device *dev)
 	return 0;
 }
 
-static int amba_kmi_resume(struct amba_device *dev)
+#ifdef CONFIG_PM_SLEEP
+static int amba_kmi_resume(struct device *dev)
 {
-	struct amba_kmi_port *kmi = amba_get_drvdata(dev);
+	struct amba_kmi_port *kmi = dev_get_drvdata(dev);
 
 	/* kick the serio layer to rescan this port */
 	serio_reconnect(kmi->io);
 
 	return 0;
 }
+#endif
+
+static SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume);
 
 static struct amba_id amba_kmi_idtable[] = {
 	{
@@ -199,11 +203,11 @@ static struct amba_driver ambakmi_driver = {
 	.drv		= {
 		.name	= "kmi-pl050",
 		.owner	= THIS_MODULE,
+		.pm	= &amba_kmi_dev_pm_ops,
 	},
 	.id_table	= amba_kmi_idtable,
 	.probe		= amba_kmi_probe,
 	.remove		= amba_kmi_remove,
-	.resume		= amba_kmi_resume,
 };
 
 module_amba_driver(ambakmi_driver);
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: ulf.hansson@linaro.org (Ulf Hansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] input: ambakmi: Fix system PM by converting to modern callbacks
Date: Tue, 14 Apr 2015 12:41:48 +0200	[thread overview]
Message-ID: <1429008108-29295-1-git-send-email-ulf.hansson@linaro.org> (raw)

The legacy system PM support has long time ago been dropped from the
AMBA bus. Align to that by converting to the modern system PM
callbacks.

Fixes: 26825cfd90f9 (ARM: 7914/1: amba: Drop legacy PM support ...)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/input/serio/ambakmi.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 8b748d9..058e1d8 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -175,15 +175,19 @@ static int amba_kmi_remove(struct amba_device *dev)
 	return 0;
 }
 
-static int amba_kmi_resume(struct amba_device *dev)
+#ifdef CONFIG_PM_SLEEP
+static int amba_kmi_resume(struct device *dev)
 {
-	struct amba_kmi_port *kmi = amba_get_drvdata(dev);
+	struct amba_kmi_port *kmi = dev_get_drvdata(dev);
 
 	/* kick the serio layer to rescan this port */
 	serio_reconnect(kmi->io);
 
 	return 0;
 }
+#endif
+
+static SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume);
 
 static struct amba_id amba_kmi_idtable[] = {
 	{
@@ -199,11 +203,11 @@ static struct amba_driver ambakmi_driver = {
 	.drv		= {
 		.name	= "kmi-pl050",
 		.owner	= THIS_MODULE,
+		.pm	= &amba_kmi_dev_pm_ops,
 	},
 	.id_table	= amba_kmi_idtable,
 	.probe		= amba_kmi_probe,
 	.remove		= amba_kmi_remove,
-	.resume		= amba_kmi_resume,
 };
 
 module_amba_driver(ambakmi_driver);
-- 
1.9.1

             reply	other threads:[~2015-04-14 10:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 10:41 Ulf Hansson [this message]
2015-04-14 10:41 ` [PATCH] input: ambakmi: Fix system PM by converting to modern callbacks Ulf Hansson
2015-04-14 16:22 ` Dmitry Torokhov
2015-04-14 16:22   ` Dmitry Torokhov
2015-04-14 22:30   ` Russell King - ARM Linux
2015-04-14 22:30     ` Russell King - ARM Linux
2015-04-14 23:58     ` Dmitry Torokhov
2015-04-14 23:58       ` Dmitry Torokhov
2015-04-15  9:32       ` Russell King - ARM Linux
2015-04-15  9:32         ` Russell King - ARM Linux
2015-04-15 11:54         ` Ulf Hansson
2015-04-15 11:54           ` Ulf Hansson
2015-04-15 17:23         ` Dmitry Torokhov
2015-04-15 17:23           ` Dmitry Torokhov
2015-05-22 14:37 ` Ulf Hansson
2015-05-22 14:37   ` Ulf Hansson
2015-05-22 14:39   ` Russell King - ARM Linux
2015-05-22 14:39     ` Russell King - ARM Linux
2015-05-26 13:50     ` Ulf Hansson
2015-05-26 13:50       ` Ulf Hansson
2015-05-22 16:49   ` Dmitry Torokhov
2015-05-22 16:49     ` Dmitry Torokhov
2015-07-16  8:48     ` Ulf Hansson
2015-07-16  8:48       ` Ulf Hansson
2015-07-16 17:37       ` Dmitry Torokhov
2015-07-16 17:37         ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429008108-29295-1-git-send-email-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.