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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 3 Apr 2014 12:48:47 +0100
From:	Charles Keepax <>
To:	Mark Brown <>
Subject: Re: [PATCH] regulator: core: Get and put regulator of_node

On Thu, Apr 03, 2014 at 12:14:31PM +0100, Mark Brown wrote:
> On Thu, Apr 03, 2014 at 11:58:04AM +0100, Charles Keepax wrote:
> > The main issue I have is that devm_regualtor_register is a bit
> > awkward. With regulator_register you will always be calling
> > regulator_unregister so you can put the of_node there but with
> > devm there isn't really a good place to put the of_node.
> That's why I suggested it might be OK to take a reference in the core -
> this would allow the device probe to safely drop its reference before it
> returns.
> > Would perhaps a sensible thing here be to add an of_node_get to
> > of_regulator_match, since we seem to be expecting that to
> > increase the ref count. And then just add an of_node_put to
> > regulator_unregister. And for anything directly using
> > regulator_register/devm_regulator_register they should add a
> > manual of_node_get?
> That seems very ugly.

Agreed, it is not exactly made of clean interface success. So I
guess the sensible thing is to add a helper to clean up the
of_regulator_match results and add the node get in the regulator
core as per my original patch. I will fix up the commit message
for it and do patches for the other bits.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists