* [PATCH] reset: Add missing function stub for device_reset
@ 2016-04-01 19:38 Daniel Lezcano
2016-04-04 16:19 ` Philipp Zabel
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Lezcano @ 2016-04-01 19:38 UTC (permalink / raw)
To: p.zabel; +Cc: matthias.bgg, open list
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)
+{
+ return -ENOTSUPP;
+}
+
static inline int device_reset_optional(struct device *dev)
{
return -ENOTSUPP;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] reset: Add missing function stub for device_reset
2016-04-01 19:38 [PATCH] reset: Add missing function stub for device_reset Daniel Lezcano
@ 2016-04-04 16:19 ` Philipp Zabel
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2016-04-04 16:19 UTC (permalink / raw)
To: Daniel Lezcano; +Cc: matthias.bgg, open list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-04 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 19:38 [PATCH] reset: Add missing function stub for device_reset Daniel Lezcano
2016-04-04 16:19 ` Philipp Zabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.