From: Shawn Guo Date: Sun, 14 Jul 2013 13:35:49 +0000 (+0800) Subject: ENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5a5e21c11d147060523926a0f9a279cefa3f7956;p=karo-tx-linux.git 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 --- 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