From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xyzzy.farnsworth.org (xyzzy.farnsworth.org [65.39.95.219]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 42841DE2FE for ; Sat, 19 Apr 2008 06:58:24 +1000 (EST) Date: Fri, 18 Apr 2008 13:58:15 -0700 From: Dale Farnsworth To: Remi Machet Message-ID: <20080418205815.GA21162@farnsworth.org> References: <1208475355.5789.30.camel@pcds-ts102.slac.stanford.edu> MIME-Version: 1.0 In-Reply-To: <1208475355.5789.30.camel@pcds-ts102.slac.stanford.edu> Subject: Re: [PATCH] sysdev,mv64x60: initialization of mv64x60 ethernet, serial and I2C Content-Type: text/plain; charset=us-ascii Cc: linuxppc-dev@ozlabs.org, Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Apr 17, 2008 at 04:35:55PM -0700, Remi Machet wrote: > This patch affects only the mv64x60 driver. It fixes 2 problem: Hi Remi, Thanks for finding and addressing these issues. BTW, since you're fixing 2 problems, you might split this into 2 patches. > -If one of the devices of the mv64x60 init fails, the remaining > devices are not initialized => I changed the code to display an > error and continue the initialization. I agree that this is a good idea. A small comment on details below. > -I2C parameters freq_m and freq_n are assigned default in the code > but if those properties are not found in the open firmware description > the init returns an error=> the code now uses the default > values if the properties are not found. Yes. Sigh, I can't believe I missed this. > diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c > index 047b310..ef0fc99 100644 > --- a/arch/powerpc/sysdev/mv64x60_dev.c > +++ b/arch/powerpc/sysdev/mv64x60_dev.c > @@ -433,9 +431,15 @@ static int __init mv64x60_device_setup(void) > int err; > > id = 0; > - for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") > - if ((err = mv64x60_mpsc_device_setup(np, id++))) > - goto error; > + for_each_compatible_node(np, "serial", "marvell,mv64360-mpsc") { > + err = mv64x60_mpsc_device_setup(np, id++); > + if (err) { > + printk(KERN_ERR "Failed to initialize MV64x60 " \ > + "serial device %s: error %d.\n", > + np->full_name, err); > + of_node_put(np); This of_node_put call (and the others you added) are not needed. Thanks, -Dale