From 5a5e21c11d147060523926a0f9a279cefa3f7956 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sun, 14 Jul 2013 21:35:49 +0800 Subject: [PATCH] ENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build Add dummy device_reset() function for !CONFIG_RESET_CONTROLLER build, so that we do not have to add #ifdef CONFIG_RESET_CONTROLLER in every single client device drivers that call the function. Signed-off-by: Shawn Guo --- include/linux/reset.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/reset.h b/include/linux/reset.h index 6082247feab1..2a8e982182f0 100644 --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -12,6 +12,13 @@ struct reset_control *reset_control_get(struct device *dev, const char *id); void reset_control_put(struct reset_control *rstc); struct reset_control *devm_reset_control_get(struct device *dev, const char *id); +#ifdef CONFIG_RESET_CONTROLLER int device_reset(struct device *dev); +#else +static inline int device_reset(struct device *dev) +{ + return 0; +} +#endif /* CONFIG_RESET_CONTROLLER */ #endif -- 2.39.5