lkml.org 
[lkml]   [2018]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/7] PM / Domain: Add struct device to genpd
On 22-03-18, 11:18, Ulf Hansson wrote:
> On 22 March 2018 at 10:59, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > On 22-03-18, 10:30, Ulf Hansson wrote:
> >> On 22 December 2017 at 08:26, Viresh Kumar <viresh.kumar@linaro.org> wrote:

> >> > + ret = device_add(&genpd->dev);
> >>
> >> What's the point of adding the device? Can we skip this step, as I
> >> guess the opp core is only using the device as cookie rather actual
> >> using it? No?
> >
> > We also use it for the OPP debugfs stuff, so that would be required I believe.
>
> Right, however, isn't that only using the dev_name(dev), which you
> don't need to add the device to make use of.
>
> Or maybe I missing something around this...

So I tested this bit. The code works fine even if the device isn't added
(registered), but this looks a bit sloppy to attempt.

Please let me know what would you prefer in this case, add the device or not.

--
viresh

\
 
 \ /
  Last update: 2018-04-09 09:54    [W:0.048 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site