diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-03-11 08:04:23 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-03-11 17:19:42 +0900 |
commit | 49976927de5c52c415d4809c7d56700cc8ff4215 (patch) | |
tree | e56b5a0cecf31e7e238245687895fb51a0f95973 /drivers/input/keyboard | |
parent | 4a55026fd7a08074676e87932578ff9e327e82a3 (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')
-rw-r--r-- | drivers/input/keyboard/sh_keysc.c | 7 |
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) 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)) |