Skip to content

Commit babc94d

Browse files
ye xingchendtor
authored andcommitted
Input: st-keyscan - 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 27d5e05 commit babc94d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/input/keyboard/st-keyscan.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ static int keyscan_probe(struct platform_device *pdev)
125125
{
126126
struct st_keyscan *keypad_data;
127127
struct input_dev *input_dev;
128-
struct resource *res;
129128
int error;
130129

131130
if (!pdev->dev.of_node) {
@@ -169,8 +168,7 @@ static int keyscan_probe(struct platform_device *pdev)
169168

170169
input_set_drvdata(input_dev, keypad_data);
171170

172-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
173-
keypad_data->base = devm_ioremap_resource(&pdev->dev, res);
171+
keypad_data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
174172
if (IS_ERR(keypad_data->base))
175173
return PTR_ERR(keypad_data->base);
176174

0 commit comments

Comments
 (0)