diff options
author | David S. Miller <davem@davemloft.net> | 2013-08-22 20:49:59 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-22 20:49:59 -0700 |
commit | 5b5fde7fdd39aeae627eb99be9bd80c18774a3bf (patch) | |
tree | 72dc45610171a18a3b219aa5e6c347f9278d2a4f | |
parent | 0ca04b63801b6cbdaa539c89945982ad9dc8d858 (diff) | |
parent | d75ea942b360690a380da8012a51eaf6a6ebb1b1 (diff) |
Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next 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>
-rw-r--r-- | drivers/net/can/at91_can.c | 2 | ||||
-rw-r--r-- | drivers/net/can/c_can/c_can_platform.c | 2 | ||||
-rw-r--r-- | drivers/net/can/flexcan.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c index dbbe97ae121e..3b1ff6148702 100644 --- a/drivers/net/can/at91_can.c +++ b/drivers/net/can/at91_can.c @@ -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); diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index c6f838d922a5..294ced3cc227 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -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; diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index c48174ed49cc..71c677e651d7 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -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); |