diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-12-05 19:21:10 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-12-06 02:06:29 -0800 |
commit | c838cb3d477f79738ee03ede53a3f724021f3ae0 (patch) | |
tree | 5418f571570d6b2bb47a34bc41d31949caa603a1 /drivers/input/keyboard/sh_keysc.c | |
parent | 54f05e95132bdb47fa408308d64fd293d3ffb908 (diff) | |
download | lwn-c838cb3d477f79738ee03ede53a3f724021f3ae0.tar.gz lwn-c838cb3d477f79738ee03ede53a3f724021f3ae0.zip |
Input: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard/sh_keysc.c')
-rw-r--r-- | drivers/input/keyboard/sh_keysc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index fe0e498d2479..d65a98b1d7dd 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c @@ -171,7 +171,7 @@ static int sh_keysc_probe(struct platform_device *pdev) int i; int irq, error; - if (!pdev->dev.platform_data) { + if (!dev_get_platdata(&pdev->dev)) { dev_err(&pdev->dev, "no platform data defined\n"); error = -EINVAL; goto err0; @@ -198,7 +198,7 @@ static int sh_keysc_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, priv); - memcpy(&priv->pdata, pdev->dev.platform_data, sizeof(priv->pdata)); + memcpy(&priv->pdata, dev_get_platdata(&pdev->dev), sizeof(priv->pdata)); pdata = &priv->pdata; priv->iomem_base = ioremap_nocache(res->start, resource_size(res)); |