lantiq: fix wrong parameter order in xway_nand driver
[openwrt.git] / target / linux / lantiq / patches-4.4 / 0034-reset-Fix-compile-when-reset-RESET_CONTROLLER-is-not.patch
1 From b1b9fca8c317afc3f2b78bb54f877e8a830a819d Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Fri, 9 Aug 2013 18:47:27 +0200
4 Subject: [PATCH 34/36] reset: Fix compile when reset RESET_CONTROLLER is not
5  selected
6
7 Drivers need to protect their reset api calls with #ifdef to avoid compile
8 errors.
9
10 This patch adds dummy wrappers in the same way that linux/of.h does it.
11
12 Cc: linux-kernel@vger.kernel.org
13 Cc: Philipp Zabel <p.zabel@pengutronix.de>
14 Cc: Gabor Juhos <juhosg@openwrt.org>
15 ---
16  include/linux/reset-controller.h |   16 ++++++++++++++
17  include/linux/reset.h            |   43 ++++++++++++++++++++++++++++++++++++++
18  2 files changed, 59 insertions(+)
19
20 --- a/include/linux/reset-controller.h
21 +++ b/include/linux/reset-controller.h
22 @@ -48,7 +48,23 @@ struct reset_controller_dev {
23         unsigned int nr_resets;
24  };
25  
26 +#if defined(CONFIG_RESET_CONTROLLER)
27 +
28  int reset_controller_register(struct reset_controller_dev *rcdev);
29  void reset_controller_unregister(struct reset_controller_dev *rcdev);
30  
31 +#else
32 +
33 +static inline int reset_controller_register(struct reset_controller_dev *rcdev)
34 +{
35 +       return -ENOSYS;
36 +}
37 +
38 +void reset_controller_unregister(struct reset_controller_dev *rcdev)
39 +{
40 +
41 +}
42 +
43 +#endif
44 +
45  #endif