linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: sh_keysc suspend can use to_platform_device()
@ 2009-03-11  8:04 Magnus Damm
  2009-03-11  8:13 ` Trilok Soni
  2009-03-11  8:29 ` Paul Mundt
  0 siblings, 2 replies; 3+ messages in thread
From: Magnus Damm @ 2009-03-11  8:04 UTC (permalink / raw)
  To: linux-input; +Cc: soni.trilok, Magnus Damm, lethal, linux-sh

From: Magnus Damm <damm@igel.co.jp>

This patch changes sh_keysc to use to_platform_device()
for suspend. Thanks to Trilok Soni for this suggestion.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 drivers/input/keyboard/sh_keysc.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

--- 0001/drivers/input/keyboard/sh_keysc.c
+++ work/drivers/input/keyboard/sh_keysc.c	2009-03-11 13:33:14.000000000 +0900
@@ -257,13 +257,10 @@ static int __devexit sh_keysc_remove(str
 
 static int sh_keysc_suspend(struct device *dev)
 {
-	struct platform_device *pdev;
-	struct sh_keysc_priv *priv;
+	struct platform_device *pdev = to_platform_device(dev);
+	struct sh_keysc_priv *priv = platform_get_drvdata(pdev);
 	unsigned short value;
 
-	pdev = container_of(dev, struct platform_device, dev);
-	priv = platform_get_drvdata(pdev);
-
 	value = ioread16(priv->iomem_base + KYCR1_OFFS);
 
 	if (device_may_wakeup(dev))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] input: sh_keysc suspend can use to_platform_device()
  2009-03-11  8:04 [PATCH] input: sh_keysc suspend can use to_platform_device() Magnus Damm
@ 2009-03-11  8:13 ` Trilok Soni
  2009-03-11  8:29 ` Paul Mundt
  1 sibling, 0 replies; 3+ messages in thread
From: Trilok Soni @ 2009-03-11  8:13 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-input, lethal, linux-sh

Hi Magnus,

On Wed, Mar 11, 2009 at 1:34 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@igel.co.jp>
>
> This patch changes sh_keysc to use to_platform_device()
> for suspend. Thanks to Trilok Soni for this suggestion.
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>

Thanks.

Reviewed-by: Trilok Soni <soni.trilok@gmail.com>


-- 
---Trilok Soni
http://triloksoni.wordpress.com
http://www.linkedin.com/in/triloksoni

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] input: sh_keysc suspend can use to_platform_device()
  2009-03-11  8:04 [PATCH] input: sh_keysc suspend can use to_platform_device() Magnus Damm
  2009-03-11  8:13 ` Trilok Soni
@ 2009-03-11  8:29 ` Paul Mundt
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2009-03-11  8:29 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-input, soni.trilok, linux-sh

On Wed, Mar 11, 2009 at 05:04:23PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@igel.co.jp>
> 
> This patch changes sh_keysc to use to_platform_device()
> for suspend. Thanks to Trilok Soni for this suggestion.
> 
> Signed-off-by: Magnus Damm <damm@igel.co.jp>

Applied on top of the earlier patch, with Trilok's Reviewed-by, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-11  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11  8:04 [PATCH] input: sh_keysc suspend can use to_platform_device() Magnus Damm
2009-03-11  8:13 ` Trilok Soni
2009-03-11  8:29 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).