lkml.org 
[lkml]   [2021]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V2 2/6] driver core: auxiliary bus: Add driver data helpers
On Wed, Dec 08, 2021 at 12:14:41PM +0200, Andy Shevchenko wrote:
> On Wed, Dec 08, 2021 at 11:12:20AM +0200, Leon Romanovsky wrote:
> > On Wed, Dec 08, 2021 at 09:43:37AM +0100, Greg KH wrote:
>
> ...
>
> > The idea that you have two APIs which do the same thing, one is
> > obfuscated version of another.
> >
> > If you don't want from people to use driver core function and structures,
> > you shouldn't expose them in global headers.
>
> For all these APIs the rationale is very simple. If you have callback that
> takes a pointer to the container (*), you better use the APIs related to
> this container (no need to have an explicit dereferencing). Otherwise you
> use dev_*() APIs (when it's pointer to the pure struct device).
>
> The value is to have coherent APIs around struct device containers.
>
> *) under container here I assume the data structure that has the embedded
> struct device in it.

Thanks

>
--
> With Best Regards,
> Andy Shevchenko
>
>

\
 
 \ /
  Last update: 2021-12-08 11:49    [W:0.050 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site