mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n
@ 2020-02-20  9:33 Ahmad Fatoum
  2020-03-02  8:20 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2020-02-20  9:33 UTC (permalink / raw)
  To: barebox

Users of an optional device_reset that have CONFIG_RESET_CONTROLLER=n
will trigger compilation errors. Add a static inline stub to fix it.

[ Note: device_reset is unused and unusable because we have no reset
  controller implementing .reset. It's available in Linux though and
  apparently useful for shared resets, so it's left in ]

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index a22bcf9a5d64..4a92a177bc75 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -55,6 +55,12 @@ static inline int device_reset_us(struct device_d *dev, int us)
 	return 0;
 }
 
+static inline int device_reset(struct device_d *dev)
+{
+	WARN_ON(1);
+	return 0;
+}
+
 #endif /* CONFIG_RESET_CONTROLLER */
 
 #endif
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n
  2020-02-20  9:33 [PATCH] reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n Ahmad Fatoum
@ 2020-03-02  8:20 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-03-02  8:20 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Thu, Feb 20, 2020 at 10:33:27AM +0100, Ahmad Fatoum wrote:
> Users of an optional device_reset that have CONFIG_RESET_CONTROLLER=n
> will trigger compilation errors. Add a static inline stub to fix it.
> 
> [ Note: device_reset is unused and unusable because we have no reset
>   controller implementing .reset. It's available in Linux though and
>   apparently useful for shared resets, so it's left in ]
> 
> Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
> ---
>  include/linux/reset.h | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-02  8:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20  9:33 [PATCH] reset: add stub for device_reset when CONFIG_RESET_CONTROLLER=n Ahmad Fatoum
2020-03-02  8:20 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox