mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] fix miiphy alloc
@ 2010-04-14  8:05 Jan Weitzel
  2010-04-14  8:14 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Weitzel @ 2010-04-14  8:05 UTC (permalink / raw)
  To: barebox

if fec was allocated using malloc. if fec->miiphy->dev->driver != 0
miiphy_probe is not called

Signed-off-by: Jan Weitzel <J.Weitzel@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,


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] fix miiphy alloc
  2010-04-14  8:05 [PATCH] fix miiphy alloc Jan Weitzel
@ 2010-04-14  8:14 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2010-04-14  8:14 UTC (permalink / raw)
  To: Jan Weitzel; +Cc: barebox

Hi Jan,

On Wed, Apr 14, 2010 at 10:05:07AM +0200, Jan Weitzel wrote:
> if fec was allocated using malloc. if fec->miiphy->dev->driver != 0
> miiphy_probe is not called

Thanks, both applied.

Sascha

> 
> Signed-off-by: Jan Weitzel <J.Weitzel@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,
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-14  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-14  8:05 [PATCH] fix miiphy alloc Jan Weitzel
2010-04-14  8:14 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox