lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FB7D676.9000609@nvidia.com>
Date:	Sat, 19 May 2012 22:50:54 +0530
From:	Laxman Dewangan <ldewangan@...dia.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	"lrg@...com" <lrg@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: core: use correct device for device supply
 lookup

On Saturday 19 May 2012 10:44 PM, Laxman Dewangan wrote:
> On Saturday 19 May 2012 10:11 PM, Mark Brown wrote:
>> * PGP Signed by an unknown key
>>
>> On Sat, May 19, 2012 at 07:44:06PM +0530, Laxman Dewangan wrote:
>>> When registering the regulator driver, use the rdev->dev for
>>> getting the regulator device of given supply instead of parent
>>> device.
>> You're providing no motivation for this and it's difficult to see how it
>> improves things.  The class device is dynamically numbered so it's not
>> suitable for specifying supplies on a non-DT system and for a DT system
>> it's not obvious to me that we would want to involve the class device in
>> anything, it requires an additional layer of indirection but that's
>> about it.
> If I dont do this then it will not enter in the following case for
> getting the regulator_dev of supply regulator because dev->of_node is
> null, the tps65910-regulator driver have not set the pdev->dev.ofnode.
>
> static struct regulator_dev *regulator_dev_lookup(struct device *dev,
>                                                     const char *supply,
>                                                     int *ret)
> {
>           /* first do a dt based lookup */
>           if (dev&&  dev->of_node) {
> ::::::::::::::::
>               /* Get the regulator device */
>
>       }
> ::::::::::::::::::
> }
Also in regulator_register we set the of_node as
        rdev->dev.of_node = config->of_node;
         rdev->dev.parent = dev;

Passed config->of_node will only be used if we pass the rdev->dev, not 
rdev->dev.parent

Am I missing anything here in understanding?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ