Skip to content

Commit b1066df

Browse files
bbkzzdtor
authored andcommitted
Input: nspire-keypad - 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: Yangtao Li <frank.li@vivo.com> Link: https://lore.kernel.org/r/20230705052346.39337-3-frank.li@vivo.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 3799836 commit b1066df

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/input/keyboard/nspire-keypad.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,7 @@ static int nspire_keypad_probe(struct platform_device *pdev)
186186
return PTR_ERR(keypad->clk);
187187
}
188188

189-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
190-
keypad->reg_base = devm_ioremap_resource(&pdev->dev, res);
189+
keypad->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
191190
if (IS_ERR(keypad->reg_base))
192191
return PTR_ERR(keypad->reg_base);
193192

0 commit comments

Comments
 (0)