Skip to content

Commit 27d5e05

Browse files
ye xingchendtor
authored andcommitted
Input: spear-keyboard - use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 492ec55 commit 27d5e05

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/input/keyboard/spear-keyboard.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ static int spear_kbd_probe(struct platform_device *pdev)
186186
const struct matrix_keymap_data *keymap = pdata ? pdata->keymap : NULL;
187187
struct spear_kbd *kbd;
188188
struct input_dev *input_dev;
189-
struct resource *res;
190189
int irq;
191190
int error;
192191

@@ -219,8 +218,7 @@ static int spear_kbd_probe(struct platform_device *pdev)
219218
kbd->suspended_rate = pdata->suspended_rate;
220219
}
221220

222-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
223-
kbd->io_base = devm_ioremap_resource(&pdev->dev, res);
221+
kbd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
224222
if (IS_ERR(kbd->io_base))
225223
return PTR_ERR(kbd->io_base);
226224

0 commit comments

Comments
 (0)