* [PATCH] reset: Provide !RESET_CONTROLLER stub for devm_reset_control_get()
@ 2014-08-01 17:11 Mark Brown
2014-08-04 7:58 ` Philipp Zabel
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2014-08-01 17:11 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-kernel, linaro-kernel, Mark Brown
From: Mark Brown <broonie@linaro.org>
At least the sun6i DMA controller driver makes use of the reset controller
API stubs when being built for coverage and otherwise fails to build.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
include/linux/reset.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 349f150..28f119f 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -67,6 +67,13 @@ static inline int device_reset_optional(struct device *dev)
return -ENOSYS;
}
+static inline struct reset_control *devm_reset_control_get(struct device *dev,
+ const char *id)
+{
+ WARN_ON(1);
+ return ERR_PTR(-ENOSYS);
+}
+
static inline struct reset_control *reset_control_get_optional(
struct device *dev, const char *id)
{
--
2.0.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] reset: Provide !RESET_CONTROLLER stub for devm_reset_control_get()
2014-08-01 17:11 [PATCH] reset: Provide !RESET_CONTROLLER stub for devm_reset_control_get() Mark Brown
@ 2014-08-04 7:58 ` Philipp Zabel
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2014-08-04 7:58 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, linaro-kernel, Mark Brown
Hi Mark,
Am Freitag, den 01.08.2014, 18:11 +0100 schrieb Mark Brown:
> From: Mark Brown <broonie@linaro.org>
>
> At least the sun6i DMA controller driver makes use of the reset controller
> API stubs when being built for coverage and otherwise fails to build.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
> include/linux/reset.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index 349f150..28f119f 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -67,6 +67,13 @@ static inline int device_reset_optional(struct device *dev)
> return -ENOSYS;
> }
>
> +static inline struct reset_control *devm_reset_control_get(struct device *dev,
> + const char *id)
> +{
> + WARN_ON(1);
> + return ERR_PTR(-ENOSYS);
> +}
> +
I'd prefer to keep devm_reset_control_get without a stub.
Drivers that can be built without CONFIG_RESET_CONTROLLER enabled should
use devm_reset_control_get_optional, and this way the build tests
already report this issue.
regards
Philipp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-04 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-01 17:11 [PATCH] reset: Provide !RESET_CONTROLLER stub for devm_reset_control_get() Mark Brown
2014-08-04 7:58 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®