lkml.org 
[lkml]   [2014]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regmap: provide dummy regmap_exit()
On 11/25/2014 09:21 PM, Olof Johansson wrote:
> Fixes build error:
>
> sound/soc/soc-core.c: In function 'snd_soc_component_exit_regmap':
> sound/soc/soc-core.c:2644:2: error: implicit declaration of function 'regmap_exit' [-Werror=implicit-function-declaration]
> regmap_exit(component->regmap);
>
> Due to the other regmap functions providing appropriate stubs when
> !CONFIG_REGMAP, but this one is missing. Add it.
>
> Signed-off-by: Olof Johansson <olof@lixom.net>

I did a different patch for this I was just about to send. This looks good
as well I guess, but ...

> ---
> include/linux/regmap.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/include/linux/regmap.h b/include/linux/regmap.h
> index 4419b99..efb58a0 100644
> --- a/include/linux/regmap.h
> +++ b/include/linux/regmap.h
> @@ -737,6 +737,11 @@ static inline struct regmap *dev_get_regmap(struct device *dev,
> return NULL;
> }
>
> +static inline void regmap_exit(struct regmap *map)
> +{
> + return;

... but we really don't need the return here.

> +}
> +
> static inline struct device *regmap_get_device(struct regmap *map)
> {
> WARN_ONCE(1, "regmap API is disabled");
>



\
 
 \ /
  Last update: 2014-11-25 22:21    [W:0.077 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site