* [PATCH] regulator: Add empty devm_regulator_free for !CONFIG_REGULATOR @ 2012-01-29 2:30 Axel Lin 2012-01-29 9:42 ` Axel Lin 0 siblings, 1 reply; 3+ messages in thread From: Axel Lin @ 2012-01-29 2:30 UTC (permalink / raw) To: linux-kernel; +Cc: Liam Girdwood, Mark Brown So we don't have to add #ifdef CONFIG_REGULATOR guards for all the callers of devm_regulator_free. Signed-off-by: Axel Lin <axel.lin@gmail.com> --- include/linux/regulator/consumer.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index cef8f04..ad4eae8 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -216,6 +216,10 @@ static inline void regulator_put(struct regulator *regulator) { } +static inline void devm_regulator_free(struct regulator *regulator) +{ +} + static inline int regulator_enable(struct regulator *regulator) { return 0; -- 1.7.5.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Add empty devm_regulator_free for !CONFIG_REGULATOR 2012-01-29 2:30 [PATCH] regulator: Add empty devm_regulator_free for !CONFIG_REGULATOR Axel Lin @ 2012-01-29 9:42 ` Axel Lin 2012-01-29 21:28 ` Mark Brown 0 siblings, 1 reply; 3+ messages in thread From: Axel Lin @ 2012-01-29 9:42 UTC (permalink / raw) To: linux-kernel; +Cc: Liam Girdwood, Mark Brown > +static inline void devm_regulator_free(struct regulator *regulator) > +{ > +} > + Oh wait. I found commit d5ad34f7cb "regulator: Implement devm_regulator_free()" has declared devm_regulator_free in include/linux/regulator/consumer.h But it actually implements devm_regulator_put instead of devm_regulator_free. Mark, I guess what you want is to declare devm_regulator_put instead of devm_regulator_free in consumer.h. Regards, Axel > static inline int regulator_enable(struct regulator *regulator) > { > return 0; > -- > 1.7.5.4 > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: Add empty devm_regulator_free for !CONFIG_REGULATOR 2012-01-29 9:42 ` Axel Lin @ 2012-01-29 21:28 ` Mark Brown 0 siblings, 0 replies; 3+ messages in thread From: Mark Brown @ 2012-01-29 21:28 UTC (permalink / raw) To: Axel Lin; +Cc: linux-kernel, Liam Girdwood On Sun, Jan 29, 2012 at 05:42:51PM +0800, Axel Lin wrote: > Mark, I guess what you want is to declare devm_regulator_put instead > of devm_regulator_free > in consumer.h. Yes, indeed - put to match the get. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-29 21:28 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-01-29 2:30 [PATCH] regulator: Add empty devm_regulator_free for !CONFIG_REGULATOR Axel Lin 2012-01-29 9:42 ` Axel Lin 2012-01-29 21:28 ` Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox