lkml.org 
[lkml]   [2011]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] rfkill: Regulator consumer driver for rfkill
From
Date
On Tue, 2011-04-12 at 08:15 -0700, Mark Brown wrote:
> On Tue, Apr 12, 2011 at 01:44:02PM +0200, Johannes Berg wrote:
> > On Tue, 2011-04-12 at 13:41 +0200, Johannes Berg wrote:
>
> > > > + if (pdata->name == NULL || pdata->type == 0) {
> > > > + dev_err(&pdev->dev, "invalid name or type in platform data\n");
> > > > + return -EINVAL;
> > > > + }
>
> > > > + vcc = regulator_get_exclusive(&pdev->dev, "vrfkill");
>
> > > Wasn't that supposed to use pdata->supply? Actually, there's no member
> > > "supply" in the struct?
>
> No, if you're passing supply names through platform data something has
> gone wrong - that's a big no no.

Ok. The comment seems a little wrong still though, maybe leftover bits
from an older version?

> > Oh wait, I think I just misunderstood how this works. But if the name is
> > "vrfkill" how does that really work with multiple instances?
>
> That's what the struct device is there for. The names are mapped into
> physical regulators relative to the device.

Oh ok, makes sense, thanks for the clarification.

johannes



\
 
 \ /
  Last update: 2011-04-12 17:25    [from the cache]
©2003-2011 Jasper Spaans