diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-02-28 05:05:25 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-28 21:22:20 +0100 |
commit | 915239472a5015c7667025551a73e11d6e2abee0 (patch) | |
tree | 49ca698d25d15e9c9282a108661435827c5815fe | |
parent | netlink: handle errors from netlink_dump() (diff) | |
download | linux-915239472a5015c7667025551a73e11d6e2abee0.tar.xz linux-915239472a5015c7667025551a73e11d6e2abee0.zip |
macb: don't use platform_set_drvdata() on a net_device
Commit 71d6429 (Driver core: convert platform_{get,set}_drvdata to
static inline functions) now triggers a warning in the macb network
driver:
CC drivers/net/macb.o
drivers/net/macb.c: In function ‘macb_mii_init’:
drivers/net/macb.c:263: warning: passing argument 1 of ‘platform_set_drvdata’ from incompatible pointer type
include/linux/platform_device.h:138: note: expected ‘struct platform_device *’ but argument is of type ‘struct net_device *’
Use dev_set_drvdata() on the device embedded in the net_device instead.
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/macb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index f69e73e2191e..79ccb54ab00c 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -260,7 +260,7 @@ static int macb_mii_init(struct macb *bp) for (i = 0; i < PHY_MAX_ADDR; i++) bp->mii_bus->irq[i] = PHY_POLL; - platform_set_drvdata(bp->dev, bp->mii_bus); + dev_set_drvdata(&bp->dev->dev, bp->mii_bus); if (mdiobus_register(bp->mii_bus)) goto err_out_free_mdio_irq; |