Skip to content

Commit

Permalink
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-n…
Browse files Browse the repository at this point in the history
…ext into cpsw

Marc Kleine-Budde says:

====================
another pull-request for net-next. It consists of two patches by Libo
Chen, the at91 and flexcan driver make use of platform_set_drvdata()
rather than open coding it. Chen Gang improves the error checking in
the c_can_platform driver's probe function.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 23, 2013
2 parents 0ca04b6 + d75ea94 commit 5b5fde7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ static int at91_can_probe(struct platform_device *pdev)
if (at91_is_sam9263(priv))
dev->sysfs_groups[0] = &at91_sysfs_attr_group;

dev_set_drvdata(&pdev->dev, dev);
platform_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);

err = register_candev(dev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/c_can/c_can_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static int c_can_plat_probe(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
if (IS_ERR(priv->raminit_ctrlreg) || (int)priv->instance < 0)
dev_info(&pdev->dev, "control memory is not used for raminit\n");
else
priv->raminit = c_can_hw_raminit;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/flexcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ static int flexcan_probe(struct platform_device *pdev)

netif_napi_add(dev, &priv->napi, flexcan_poll, FLEXCAN_NAPI_WEIGHT);

dev_set_drvdata(&pdev->dev, dev);
platform_set_drvdata(pdev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);

err = register_flexcandev(dev);
Expand Down

0 comments on commit 5b5fde7

Please sign in to comment.