Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Scott Wood
On Thu, 16 Sep 2010 20:40:44 +0400 Anton Vorontsov wrote: > On Thu, Sep 16, 2010 at 11:14:48AM -0500, Scott Wood wrote: > > > > DEFINE_MUTEX(fsl_elbc_mutex); > > > > > > I'd place the mutex inside the fsl_lbc_ctrl_dev, > > > i.e. fsl_lbc_ctrl_dev->nand_lock. This is to avoid more > > > global va

Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Anton Vorontsov
On Thu, Sep 16, 2010 at 11:14:48AM -0500, Scott Wood wrote: > > > DEFINE_MUTEX(fsl_elbc_mutex); > > > > I'd place the mutex inside the fsl_lbc_ctrl_dev, > > i.e. fsl_lbc_ctrl_dev->nand_lock. This is to avoid more > > global variables. > > I wouldn't. If the lock is only meaningful to the NAND dr

Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Scott Wood
On Thu, 16 Sep 2010 15:26:24 +0400 Anton Vorontsov wrote: > On Thu, Sep 16, 2010 at 06:39:40PM +0800, Zang Roy-R61911 wrote: > [...] > > But my code has some assignment for "foo" instead of a simple > > allocation, how about this way for my code: > > This will surely work, and all the rest is ju

Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Anton Vorontsov
On Thu, Sep 16, 2010 at 06:39:40PM +0800, Zang Roy-R61911 wrote: [...] > But my code has some assignment for "foo" instead of a simple > allocation, how about this way for my code: This will surely work, and all the rest is just a matter of taste. So, I'm fine with it. But see below, I think I fou

RE: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Zang Roy-R61911
ad.org; a...@linux-foundation.org; > dw...@infradead.org; Gala Kumar-B11780 > Subject: Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand > flash partitions > > On Thu, Sep 16, 2010 at 06:08:14PM +0800, Zang Roy-R61911 wrote: > [...] > > Interesting. >

Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Anton Vorontsov
On Thu, Sep 16, 2010 at 06:08:14PM +0800, Zang Roy-R61911 wrote: [...] > Interesting. > How about this? > #include > #include > > char *foo; > > void probe(void) > { > char *bar = NULL; > > if (!foo) { > bar = malloc(sizeof(*bar)); > if (!bar) >

RE: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Zang Roy-R61911
B25806; Wood Scott-B07421; Gala Kumar- > B11780; linuxppc-...@ozlabs.org > Subject: Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand > flash partitions > > On Thu, Sep 16, 2010 at 04:50:05PM +0800, Zang Roy-R61911 wrote: > > > On Thu, Sep 16

Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Anton Vorontsov
On Thu, Sep 16, 2010 at 04:50:05PM +0800, Zang Roy-R61911 wrote: > > On Thu, Sep 16, 2010 at 02:41:23PM +0800, Roy Zang wrote: > > [...] > > > -static int __devinit fsl_elbc_chip_probe(struct fsl_elbc_ctrl *ctrl, > > > - struct device_node *node) > > > +/* > > >

RE: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Zang Roy-R61911
B25806; Wood Scott-B07421; Gala Kumar- > B11780; linuxppc-...@ozlabs.org > Subject: Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand > flash partitions > > On Thu, Sep 16, 2010 at 02:41:23PM +0800, Roy Zang wrote: > [...] > > -static int __devinit fsl_

Re: [PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Anton Vorontsov
On Thu, Sep 16, 2010 at 02:41:23PM +0800, Roy Zang wrote: [...] > -static int __devinit fsl_elbc_chip_probe(struct fsl_elbc_ctrl *ctrl, > - struct device_node *node) > +/* > + * Currently only one elbc probe is supported. > + */ > +static int __devinit fsl_elbc_

[PATCH 2/3 v3] P4080/mtd: Only make elbc nand driver detect nand flash partitions

2010-09-16 Thread Roy Zang
From: Jack Lan The former driver had the two functions: 1. detecting nand flash partitions; 2. registering elbc interrupt. Now, second function is removed to fsl_lbc.c. Signed-off-by: Lan Chunhe-B25806 Signed-off-by: Roy Zang --- drivers/mtd/nand/Kconfig |1 + drivers/mtd/nand/f