[PATCH] fix miiphy alloc
Jan Weitzel
J.Weitzel at phytec.de
Wed Apr 14 04:05:07 EDT 2010
if fec was allocated using malloc. if fec->miiphy->dev->driver != 0
miiphy_probe is not called
Signed-off-by: Jan Weitzel <J.Weitzel at phytec.de>
---
Index: barebox-2010.04.0/drivers/net/fec_imx.c
===================================================================
--- barebox-2010.04.0.orig/drivers/net/fec_imx.c 2010-04-14 09:57:21.019441257 +0200
+++ barebox-2010.04.0/drivers/net/fec_imx.c 2010-04-14 09:59:38.489396111 +0200
@@ -542,10 +542,10 @@
#ifdef CONFIG_ARCH_IMX27
PCCR0 |= PCCR0_FEC_EN;
#endif
- edev = (struct eth_device *)xzalloc(sizeof(struct eth_device));
- dev->type_data = edev;
- fec = (struct fec_priv *)malloc(sizeof(*fec));
- edev->priv = fec;
+ edev = (struct eth_device *)xzalloc(sizeof(struct eth_device));
+ dev->type_data = edev;
+ fec = (struct fec_priv *)xzalloc(sizeof(*fec));
+ edev->priv = fec;
edev->open = fec_open,
edev->init = fec_init,
edev->send = fec_send,
More information about the barebox
mailing list