aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/sh_keysc.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-11 04:04:23 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-03-11 04:19:42 -0400
commit49976927de5c52c415d4809c7d56700cc8ff4215 (patch)
treee56b5a0cecf31e7e238245687895fb51a0f95973 /drivers/input/keyboard/sh_keysc.c
parent4a55026fd7a08074676e87932578ff9e327e82a3 (diff)
input: sh_keysc suspend can use to_platform_device()
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> Reviewed-by: Trilok Soni <soni.trilok@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/input/keyboard/sh_keysc.c')
-rw-r--r--drivers/input/keyboard/sh_keysc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c
index bf92178644a..e1480fb11de 100644
--- a/drivers/input/keyboard/sh_keysc.c
+++ b/drivers/input/keyboard/sh_keysc.c
@@ -257,13 +257,10 @@ static int __devexit sh_keysc_remove(struct platform_device *pdev)
257 257
258static int sh_keysc_suspend(struct device *dev) 258static int sh_keysc_suspend(struct device *dev)
259{ 259{
260 struct platform_device *pdev; 260 struct platform_device *pdev = to_platform_device(dev);
261 struct sh_keysc_priv *priv; 261 struct sh_keysc_priv *priv = platform_get_drvdata(pdev);
262 unsigned short value; 262 unsigned short value;
263 263
264 pdev = container_of(dev, struct platform_device, dev);
265 priv = platform_get_drvdata(pdev);
266
267 value = ioread16(priv->iomem_base + KYCR1_OFFS); 264 value = ioread16(priv->iomem_base + KYCR1_OFFS);
268 265
269 if (device_may_wakeup(dev)) 266 if (device_may_wakeup(dev))