9
0
Fork 0

smc911x: embed eth_device into priv

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-07-28 15:37:37 +02:00
parent c0195269e1
commit 439f6e62a0
1 changed files with 4 additions and 5 deletions

View File

@ -368,6 +368,7 @@
#define CHIP_9221 0x9221
struct smc911x_priv {
struct eth_device edev;
struct mii_device miidev;
void __iomem *base;
};
@ -712,12 +713,10 @@ static int smc911x_probe(struct device_d *dev)
dev_info(dev, "detected %s controller\n", chip_ids[i].name);
edev = xzalloc(sizeof(struct eth_device) +
sizeof(struct smc911x_priv));
priv = xzalloc(sizeof(*priv));
edev = &priv->edev;
dev->type_data = edev;
edev->priv = (struct smc911x_priv *)(edev + 1);
priv = edev->priv;
edev->priv = priv;
edev->init = smc911x_init_dev;
edev->open = smc911x_eth_open;