diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-03-11 09:04:23 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-03-11 09:19:42 +0100 |
commit | 49976927de5c52c415d4809c7d56700cc8ff4215 (patch) | |
tree | e56b5a0cecf31e7e238245687895fb51a0f95973 /drivers/input/keyboard | |
parent | sh: clkfwk: Add resume from hibernation support. (diff) | |
download | linux-49976927de5c52c415d4809c7d56700cc8ff4215.tar.xz linux-49976927de5c52c415d4809c7d56700cc8ff4215.zip |
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 bf92178644ab..e1480fb11de3 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)) |