Skip to content

Commit

Permalink
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next
Browse files Browse the repository at this point in the history
Marc Kleine-Budde says:

====================
this is a pull-request for net-next/master. It consists of 4 patches by
Jingoo Han, which remove the unnecessary platform_set_drvdata() and a
patch by Laurent Navet converting the grcan driver to use
devm_ioremap_resource().
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 17, 2013
2 parents ed8a83a + 5727dc6 commit 345af95
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 10 deletions.
2 changes: 0 additions & 2 deletions drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,6 @@ static int at91_can_remove(struct platform_device *pdev)

unregister_netdev(dev);

platform_set_drvdata(pdev, NULL);

iounmap(priv->reg_base);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/can/c_can/c_can_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ static int c_can_plat_probe(struct platform_device *pdev)
return 0;

exit_free_device:
platform_set_drvdata(pdev, NULL);
free_c_can_dev(dev);
exit_iounmap:
iounmap(addr);
Expand All @@ -255,7 +254,6 @@ static int c_can_plat_remove(struct platform_device *pdev)
struct resource *mem;

unregister_c_can_dev(dev);
platform_set_drvdata(pdev, NULL);

free_c_can_dev(dev);
iounmap(priv->base);
Expand Down
1 change: 0 additions & 1 deletion drivers/net/can/flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,6 @@ static int flexcan_remove(struct platform_device *pdev)
struct resource *mem;

unregister_flexcandev(dev);
platform_set_drvdata(pdev, NULL);
iounmap(priv->base);

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down
7 changes: 3 additions & 4 deletions drivers/net/can/grcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,10 +1683,9 @@ static int grcan_probe(struct platform_device *ofdev)
}

res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
base = devm_request_and_ioremap(&ofdev->dev, res);
if (!base) {
dev_err(&ofdev->dev, "couldn't map IO resource\n");
err = -EADDRNOTAVAIL;
base = devm_ioremap_resource(&ofdev->dev, res);
if (IS_ERR(base)) {
err = PTR_ERR(base);
goto exit_error;
}

Expand Down
1 change: 0 additions & 1 deletion drivers/net/can/ti_hecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,6 @@ static int ti_hecc_remove(struct platform_device *pdev)
iounmap(priv->base);
release_mem_region(res->start, resource_size(res));
free_candev(ndev);
platform_set_drvdata(pdev, NULL);

return 0;
}
Expand Down

0 comments on commit 345af95

Please sign in to comment.