aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/reset.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-04-13 00:59:01 -0400
committerDan Williams <dan.j.williams@intel.com>2017-04-13 00:59:01 -0400
commitbfca9acf1a5df0ff98fbf47e363adb48612bb7ec (patch)
treea50287c88fdc60a73912d205d7bce41b7af53827 /include/linux/reset.h
parent92a3fa075d3d2716b9c662814540f1d660cbf2f5 (diff)
parent11e63f6d920d6f2dfd3cd421e939a4aec9a58dcd (diff)
Merge branch 'for-4.11/libnvdimm' into for-4.12/dax
Diffstat (limited to 'include/linux/reset.h')
-rw-r--r--include/linux/reset.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 86b4ed75359e..96fb139bdd08 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -31,31 +31,26 @@ static inline int device_reset_optional(struct device *dev)
31 31
32static inline int reset_control_reset(struct reset_control *rstc) 32static inline int reset_control_reset(struct reset_control *rstc)
33{ 33{
34 WARN_ON(1);
35 return 0; 34 return 0;
36} 35}
37 36
38static inline int reset_control_assert(struct reset_control *rstc) 37static inline int reset_control_assert(struct reset_control *rstc)
39{ 38{
40 WARN_ON(1);
41 return 0; 39 return 0;
42} 40}
43 41
44static inline int reset_control_deassert(struct reset_control *rstc) 42static inline int reset_control_deassert(struct reset_control *rstc)
45{ 43{
46 WARN_ON(1);
47 return 0; 44 return 0;
48} 45}
49 46
50static inline int reset_control_status(struct reset_control *rstc) 47static inline int reset_control_status(struct reset_control *rstc)
51{ 48{
52 WARN_ON(1);
53 return 0; 49 return 0;
54} 50}
55 51
56static inline void reset_control_put(struct reset_control *rstc) 52static inline void reset_control_put(struct reset_control *rstc)
57{ 53{
58 WARN_ON(1);
59} 54}
60 55
61static inline int __must_check device_reset(struct device *dev) 56static inline int __must_check device_reset(struct device *dev)
@@ -74,14 +69,14 @@ static inline struct reset_control *__of_reset_control_get(
74 const char *id, int index, bool shared, 69 const char *id, int index, bool shared,
75 bool optional) 70 bool optional)
76{ 71{
77 return ERR_PTR(-ENOTSUPP); 72 return optional ? NULL : ERR_PTR(-ENOTSUPP);
78} 73}
79 74
80static inline struct reset_control *__devm_reset_control_get( 75static inline struct reset_control *__devm_reset_control_get(
81 struct device *dev, const char *id, 76 struct device *dev, const char *id,
82 int index, bool shared, bool optional) 77 int index, bool shared, bool optional)
83{ 78{
84 return ERR_PTR(-ENOTSUPP); 79 return optional ? NULL : ERR_PTR(-ENOTSUPP);
85} 80}
86 81
87#endif /* CONFIG_RESET_CONTROLLER */ 82#endif /* CONFIG_RESET_CONTROLLER */