Hi Bin,

On 26 February 2015 at 00:26, Bin Meng <bmeng...@gmail.com> wrote:
> Hi Simon,
>
> On Thu, Feb 19, 2015 at 5:10 AM, Simon Glass <s...@chromium.org> wrote:
>> Add a convenience function to access the private data that a uclass stores
>> for each of its devices. Convert over most existing uses for consistency
>> and to provide an example for others.
>
> What's the benefit of doing this? It (dev_get_uclass_priv) looks
> verbose to me. And you cannot stop people from doing that
> (dev->uclass_priv) either.
>

The idea is that we can check that the device is valid, and it has a
valid uclass, that the private data is there, etc. We don't have many
checks like this at present but this makes it possible to add them.
With all the pointers flying around I would really like to add some
checking, perhaps CONFIG_DM_CHECK, which checks these pointers.

Regards,
Simon
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to