aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamiro Oliveira <Ramiro.Oliveira@synopsys.com>2017-01-13 12:57:40 -0500
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-01-20 04:36:14 -0500
commitee48c726d0b014ac8dd5ec803fb63ce0596a42cf (patch)
tree25ad83e61fbf4b46fc0e52ec4397dc4e2d215101
parent88a7f5237dfdd7f02939c4ec7ac7452e14adceab (diff)
reset: Change shared flag from int to bool
Since the new parameter being added is going to be a bool this patch changes the shared flag from int to bool to match the new parameter. Signed-off-by: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r--drivers/reset/core.c8
-rw-r--r--include/linux/reset.h32
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 10368ed8fd13..272c1e4ecb5c 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -41,7 +41,7 @@ struct reset_control {
41 struct list_head list; 41 struct list_head list;
42 unsigned int id; 42 unsigned int id;
43 unsigned int refcnt; 43 unsigned int refcnt;
44 int shared; 44 bool shared;
45 atomic_t deassert_count; 45 atomic_t deassert_count;
46 atomic_t triggered_count; 46 atomic_t triggered_count;
47}; 47};
@@ -254,7 +254,7 @@ EXPORT_SYMBOL_GPL(reset_control_status);
254 254
255static struct reset_control *__reset_control_get( 255static struct reset_control *__reset_control_get(
256 struct reset_controller_dev *rcdev, 256 struct reset_controller_dev *rcdev,
257 unsigned int index, int shared) 257 unsigned int index, bool shared)
258{ 258{
259 struct reset_control *rstc; 259 struct reset_control *rstc;
260 260
@@ -299,7 +299,7 @@ static void __reset_control_put(struct reset_control *rstc)
299} 299}
300 300
301struct reset_control *__of_reset_control_get(struct device_node *node, 301struct reset_control *__of_reset_control_get(struct device_node *node,
302 const char *id, int index, int shared) 302 const char *id, int index, bool shared)
303{ 303{
304 struct reset_control *rstc; 304 struct reset_control *rstc;
305 struct reset_controller_dev *r, *rcdev; 305 struct reset_controller_dev *r, *rcdev;
@@ -379,7 +379,7 @@ static void devm_reset_control_release(struct device *dev, void *res)
379} 379}
380 380
381struct reset_control *__devm_reset_control_get(struct device *dev, 381struct reset_control *__devm_reset_control_get(struct device *dev,
382 const char *id, int index, int shared) 382 const char *id, int index, bool shared)
383{ 383{
384 struct reset_control **ptr, *rstc; 384 struct reset_control **ptr, *rstc;
385 385
diff --git a/include/linux/reset.h b/include/linux/reset.h
index 5daff15722d3..ec1d1fd28f5f 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -13,10 +13,10 @@ int reset_control_deassert(struct reset_control *rstc);
13int reset_control_status(struct reset_control *rstc); 13int reset_control_status(struct reset_control *rstc);
14 14
15struct reset_control *__of_reset_control_get(struct device_node *node, 15struct reset_control *__of_reset_control_get(struct device_node *node,
16 const char *id, int index, int shared); 16 const char *id, int index, bool shared);
17void reset_control_put(struct reset_control *rstc); 17void reset_control_put(struct reset_control *rstc);
18struct reset_control *__devm_reset_control_get(struct device *dev, 18struct reset_control *__devm_reset_control_get(struct device *dev,
19 const char *id, int index, int shared); 19 const char *id, int index, bool shared);
20 20
21int __must_check device_reset(struct device *dev); 21int __must_check device_reset(struct device *dev);
22 22
@@ -69,14 +69,14 @@ static inline int device_reset_optional(struct device *dev)
69 69
70static inline struct reset_control *__of_reset_control_get( 70static inline struct reset_control *__of_reset_control_get(
71 struct device_node *node, 71 struct device_node *node,
72 const char *id, int index, int shared) 72 const char *id, int index, bool shared)
73{ 73{
74 return ERR_PTR(-ENOTSUPP); 74 return ERR_PTR(-ENOTSUPP);
75} 75}
76 76
77static inline struct reset_control *__devm_reset_control_get( 77static inline struct reset_control *__devm_reset_control_get(
78 struct device *dev, 78 struct device *dev,
79 const char *id, int index, int shared) 79 const char *id, int index, bool shared)
80{ 80{
81 return ERR_PTR(-ENOTSUPP); 81 return ERR_PTR(-ENOTSUPP);
82} 82}
@@ -132,19 +132,19 @@ __must_check reset_control_get_exclusive(struct device *dev, const char *id)
132static inline struct reset_control *reset_control_get_shared( 132static inline struct reset_control *reset_control_get_shared(
133 struct device *dev, const char *id) 133 struct device *dev, const char *id)
134{ 134{
135 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1); 135 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, true);
136} 136}
137 137
138static inline struct reset_control *reset_control_get_optional_exclusive( 138static inline struct reset_control *reset_control_get_optional_exclusive(
139 struct device *dev, const char *id) 139 struct device *dev, const char *id)
140{ 140{
141 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0); 141 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, false);
142} 142}
143 143
144static inline struct reset_control *reset_control_get_optional_shared( 144static inline struct reset_control *reset_control_get_optional_shared(
145 struct device *dev, const char *id) 145 struct device *dev, const char *id)
146{ 146{
147 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1); 147 return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, true);
148} 148}
149 149
150/** 150/**
@@ -185,7 +185,7 @@ static inline struct reset_control *of_reset_control_get_exclusive(
185static inline struct reset_control *of_reset_control_get_shared( 185static inline struct reset_control *of_reset_control_get_shared(
186 struct device_node *node, const char *id) 186 struct device_node *node, const char *id)
187{ 187{
188 return __of_reset_control_get(node, id, 0, 1); 188 return __of_reset_control_get(node, id, 0, true);
189} 189}
190 190
191/** 191/**
@@ -202,7 +202,7 @@ static inline struct reset_control *of_reset_control_get_shared(
202static inline struct reset_control *of_reset_control_get_exclusive_by_index( 202static inline struct reset_control *of_reset_control_get_exclusive_by_index(
203 struct device_node *node, int index) 203 struct device_node *node, int index)
204{ 204{
205 return __of_reset_control_get(node, NULL, index, 0); 205 return __of_reset_control_get(node, NULL, index, false);
206} 206}
207 207
208/** 208/**
@@ -230,7 +230,7 @@ static inline struct reset_control *of_reset_control_get_exclusive_by_index(
230static inline struct reset_control *of_reset_control_get_shared_by_index( 230static inline struct reset_control *of_reset_control_get_shared_by_index(
231 struct device_node *node, int index) 231 struct device_node *node, int index)
232{ 232{
233 return __of_reset_control_get(node, NULL, index, 1); 233 return __of_reset_control_get(node, NULL, index, true);
234} 234}
235 235
236/** 236/**
@@ -252,7 +252,7 @@ __must_check devm_reset_control_get_exclusive(struct device *dev,
252#ifndef CONFIG_RESET_CONTROLLER 252#ifndef CONFIG_RESET_CONTROLLER
253 WARN_ON(1); 253 WARN_ON(1);
254#endif 254#endif
255 return __devm_reset_control_get(dev, id, 0, 0); 255 return __devm_reset_control_get(dev, id, 0, false);
256} 256}
257 257
258/** 258/**
@@ -267,19 +267,19 @@ __must_check devm_reset_control_get_exclusive(struct device *dev,
267static inline struct reset_control *devm_reset_control_get_shared( 267static inline struct reset_control *devm_reset_control_get_shared(
268 struct device *dev, const char *id) 268 struct device *dev, const char *id)
269{ 269{
270 return __devm_reset_control_get(dev, id, 0, 1); 270 return __devm_reset_control_get(dev, id, 0, true);
271} 271}
272 272
273static inline struct reset_control *devm_reset_control_get_optional_exclusive( 273static inline struct reset_control *devm_reset_control_get_optional_exclusive(
274 struct device *dev, const char *id) 274 struct device *dev, const char *id)
275{ 275{
276 return __devm_reset_control_get(dev, id, 0, 0); 276 return __devm_reset_control_get(dev, id, 0, false);
277} 277}
278 278
279static inline struct reset_control *devm_reset_control_get_optional_shared( 279static inline struct reset_control *devm_reset_control_get_optional_shared(
280 struct device *dev, const char *id) 280 struct device *dev, const char *id)
281{ 281{
282 return __devm_reset_control_get(dev, id, 0, 1); 282 return __devm_reset_control_get(dev, id, 0, true);
283} 283}
284 284
285/** 285/**
@@ -297,7 +297,7 @@ static inline struct reset_control *devm_reset_control_get_optional_shared(
297static inline struct reset_control * 297static inline struct reset_control *
298devm_reset_control_get_exclusive_by_index(struct device *dev, int index) 298devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
299{ 299{
300 return __devm_reset_control_get(dev, NULL, index, 0); 300 return __devm_reset_control_get(dev, NULL, index, false);
301} 301}
302 302
303/** 303/**
@@ -313,7 +313,7 @@ devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
313static inline struct reset_control * 313static inline struct reset_control *
314devm_reset_control_get_shared_by_index(struct device *dev, int index) 314devm_reset_control_get_shared_by_index(struct device *dev, int index)
315{ 315{
316 return __devm_reset_control_get(dev, NULL, index, 1); 316 return __devm_reset_control_get(dev, NULL, index, true);
317} 317}
318 318
319/* 319/*