Skip to content

Commit

Permalink
input: sh_keysc suspend can use to_platform_device()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Mar 11, 2009
1 parent 4a55026 commit 4997692
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/input/keyboard/sh_keysc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4997692

Please sign in to comment.