[PATCH] input: sh_keysc suspend can use to_platform_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Magnus Damm <damm@xxxxxxxxxx>

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@xxxxxxxxxx>
---

 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))
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux