input: sh_keysc suspend can use to_platform_device()
Subsystems (3)
PATCH 1/1 input: sh_keysc suspend can use to_platform_device()
From: Magnus Damm <[email protected]>
This patch changes sh_keysc to use to_platform_device() for suspend. Thanks to Trilok Soni for this suggestion.
Signed-off-by Magnus Damm <[email protected]>
---
drivers/input/keyboard/sh_keysc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/input/keyboard/sh_keysc.c +2 -5
@@ -257,13 +257,10 @@ static int __devexit sh_keysc_remove(strstatic 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))
Hi Magnus,
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
This patch changes
sh_keyscto useto_platform_device()for suspend. Thanks to Trilok Soni for this suggestion.Signed-off-by Magnus Damm <[email protected]>
Thanks.
Reviewed-by Trilok Soni <[email protected]>
Signature · 3 lines
---Trilok Soni http://triloksoni.wordpress.com http://www.linkedin.com/in/triloksoni
Quoted 6 lines · Magnus Damm
From: Magnus Damm <[email protected]>
This patch changes
sh_keyscto useto_platform_device()for suspend. Thanks to Trilok Soni for this suggestion.Signed-off-by Magnus Damm <[email protected]>
Applied on top of the earlier patch, with Trilok's Reviewed-by, thanks.