Skip to content

Commit f8890bd

Browse files
Mukesh Ojhadtor
authored andcommitted
Input: ts4800-ts - use devm_platform_ioremap_resource()
devm_platform_ioremap_resource() internally have platform_get_resource() and devm_ioremap_resource() in it. So instead of calling them separately use devm_platform_ioremap_resource() directly. Signed-off-by: Mukesh Ojha <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 9601fa8 commit f8890bd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/input/touchscreen/ts4800-ts.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ static int ts4800_ts_probe(struct platform_device *pdev)
148148
{
149149
struct input_polled_dev *poll_dev;
150150
struct ts4800_ts *ts;
151-
struct resource *res;
152151
int error;
153152

154153
ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL);
@@ -159,8 +158,7 @@ static int ts4800_ts_probe(struct platform_device *pdev)
159158
if (error)
160159
return error;
161160

162-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
163-
ts->base = devm_ioremap_resource(&pdev->dev, res);
161+
ts->base = devm_platform_ioremap_resource(pdev, 0);
164162
if (IS_ERR(ts->base))
165163
return PTR_ERR(ts->base);
166164

0 commit comments

Comments
 (0)