]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00269945: reset: add dummy device_reset() for !CONFIG_RESET_CONTROLLER build
authorShawn Guo <shawn.guo@freescale.com>
Sun, 14 Jul 2013 13:35:49 +0000 (21:35 +0800)
committerJason Liu <r64343@freescale.com>
Wed, 30 Oct 2013 01:53:46 +0000 (09:53 +0800)
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 <shawn.guo@freescale.com>
include/linux/reset.h

index 6082247feab11013e6b1f0faa3e2721bf6a643bc..2a8e982182f03fbdb6c0eb10cad08c47cf618fc0 100644 (file)
@@ -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