Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1370735

Re: [PATCH] reset: Add missing function stub for device_reset

From Philipp Zabel <p.zabel@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] reset: Add missing function stub for device_reset
Date 2016-04-04 18:20 +0200
Message-ID <rkfom-5Jt-17@gated-at.bofh.it> (permalink)
References <rjd5g-zB-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Daniel,

Am Freitag, den 01.04.2016, 21:38 +0200 schrieb Daniel Lezcano:
> The Mediatek's thermal driver fails to compile when the RESET_CONTROLLER
> option is not set. Logically, as the driver depends on this option to compile,
> the Kconfig should select it but actually that is not correct because the
> Kconfig provides also the COMPILE_TEST to increase the compile test coverage.
> 
> By providing the missing 'device_reset' stub for the driver in reset.h, that
> let the kernel to compile on different platforms with the Mediatek thermal
> driver enabled with the COMPILE_TEST option.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
>  include/linux/reset.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index c4c097d..db8cd7b 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -72,6 +72,11 @@ static inline void reset_control_put(struct reset_control *rstc)
>  	WARN_ON(1);
>  }
>  
> +static inline int __must_check device_reset(struct device *dev)
> +{

+	WARN_ON(1);

> +	return -ENOTSUPP;
> +}
> +
>  static inline int device_reset_optional(struct device *dev)
>  {
>  	return -ENOTSUPP;

Thank you, I've added the warning above and applied the patch.

best regards
Philipp

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] reset: Add missing function stub for device_reset Philipp Zabel <p.zabel@pengutronix.de> - 2016-04-04 18:20 +0200

csiph-web