]> 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)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:16:30 +0000 (21:16 -0600)
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.

[shawn.guo: cherry-pick commit a9c086f35277 from imx_3.10.y]
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