[U-Boot] [PATCH 4/9] drivers: nand: implement a NAND uclass
Scott Wood
oss at buserror.net
Sat Apr 2 01:31:24 CEST 2016
On Fri, 2016-04-01 at 18:25 -0500, Scott Wood wrote:
> On Fri, 2016-04-01 at 16:59 +0530, Mugunthan V N wrote:
> > +static int nand_child_pre_probe(struct udevice *dev)
> > +{
> > + nand_info_t *nand = dev_get_uclass_priv(dev);
> > + void *priv = dev_get_priv(dev);
> > +
> > + /*
> > + * Store nand device priv pointer in nand_info so that
> > + * it can be used by nand command
> > + */
> > + nand->priv = priv;
>
> Wouldn't it make more sense to have a pointer to the device in the NAND
> struct, and let the driver manage both privs as it chooses?
This makes even less sense after seeing patch 5/9, which assumes dev priv is
nand_info_t, and stores its own data in nand->priv. Won't this overwrite
that?
-Scott
More information about the U-Boot
mailing list