summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-10 22:35:30 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-07-11 02:44:24 +0200
commit5abb32411f221a000ff3d05bea31b4ce61cc6236 (patch)
treecd8e3aaf90cc8f12133e30a434dbe9894b08b25f /drivers/input
parentInput: iqs7222 - add support for Azoteq IQS7222D (diff)
downloadlinux-5abb32411f221a000ff3d05bea31b4ce61cc6236.tar.xz
linux-5abb32411f221a000ff3d05bea31b4ce61cc6236.zip
Input: bcm-keypad - convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230705052346.39337-1-frank.li@vivo.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/bcm-keypad.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c
index 05b09066df84..0aa6ef0da0ee 100644
--- a/drivers/input/keyboard/bcm-keypad.c
+++ b/drivers/input/keyboard/bcm-keypad.c
@@ -307,7 +307,6 @@ static int bcm_kp_probe(struct platform_device *pdev)
{
struct bcm_kp *kp;
struct input_dev *input_dev;
- struct resource *res;
int error;
kp = devm_kzalloc(&pdev->dev, sizeof(*kp), GFP_KERNEL);
@@ -353,14 +352,7 @@ static int bcm_kp_probe(struct platform_device *pdev)
return error;
}
- /* Get the KEYPAD base address */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "Missing keypad base address resource\n");
- return -ENODEV;
- }
-
- kp->base = devm_ioremap_resource(&pdev->dev, res);
+ kp->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(kp->base))
return PTR_ERR(kp->base);