Skip to content

Commit

Permalink
char: xillybus: use devm_platform_ioremap_resource() to simplify code
Browse files Browse the repository at this point in the history
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.

Signed-off-by: YueHaibing <[email protected]>
Acked-by: Eli Billauer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
YueHaibing authored and gregkh committed Nov 5, 2019
1 parent 8670b2b commit 482c86c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/char/xillybus/xillybus_of.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ static int xilly_drv_probe(struct platform_device *op)
struct xilly_endpoint *endpoint;
int rc;
int irq;
struct resource *res;
struct xilly_endpoint_hardware *ephw = &of_hw;

if (of_property_read_bool(dev->of_node, "dma-coherent"))
Expand All @@ -129,9 +128,7 @@ static int xilly_drv_probe(struct platform_device *op)

dev_set_drvdata(dev, endpoint);

res = platform_get_resource(op, IORESOURCE_MEM, 0);
endpoint->registers = devm_ioremap_resource(dev, res);

endpoint->registers = devm_platform_ioremap_resource(op, 0);
if (IS_ERR(endpoint->registers))
return PTR_ERR(endpoint->registers);

Expand Down

0 comments on commit 482c86c

Please sign in to comment.