Skip to content

Commit ee48c72

Browse files
RamiroOliveirapH5
authored andcommitted
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>
1 parent 88a7f52 commit ee48c72

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

drivers/reset/core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ struct reset_control {
4141
struct list_head list;
4242
unsigned int id;
4343
unsigned int refcnt;
44-
int shared;
44+
bool shared;
4545
atomic_t deassert_count;
4646
atomic_t triggered_count;
4747
};
@@ -254,7 +254,7 @@ EXPORT_SYMBOL_GPL(reset_control_status);
254254

255255
static struct reset_control *__reset_control_get(
256256
struct reset_controller_dev *rcdev,
257-
unsigned int index, int shared)
257+
unsigned int index, bool shared)
258258
{
259259
struct reset_control *rstc;
260260

@@ -299,7 +299,7 @@ static void __reset_control_put(struct reset_control *rstc)
299299
}
300300

301301
struct 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)
303303
{
304304
struct reset_control *rstc;
305305
struct reset_controller_dev *r, *rcdev;
@@ -379,7 +379,7 @@ static void devm_reset_control_release(struct device *dev, void *res)
379379
}
380380

381381
struct 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)
383383
{
384384
struct reset_control **ptr, *rstc;
385385

include/linux/reset.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ int reset_control_deassert(struct reset_control *rstc);
1313
int reset_control_status(struct reset_control *rstc);
1414

1515
struct 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);
1717
void reset_control_put(struct reset_control *rstc);
1818
struct 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);
2020

2121
int __must_check device_reset(struct device *dev);
2222

@@ -69,14 +69,14 @@ static inline int device_reset_optional(struct device *dev)
6969

7070
static inline struct reset_control *__of_reset_control_get(
7171
struct device_node *node,
72-
const char *id, int index, int shared)
72+
const char *id, int index, bool shared)
7373
{
7474
return ERR_PTR(-ENOTSUPP);
7575
}
7676

7777
static inline struct reset_control *__devm_reset_control_get(
7878
struct device *dev,
79-
const char *id, int index, int shared)
79+
const char *id, int index, bool shared)
8080
{
8181
return ERR_PTR(-ENOTSUPP);
8282
}
@@ -132,19 +132,19 @@ __must_check reset_control_get_exclusive(struct device *dev, const char *id)
132132
static inline struct reset_control *reset_control_get_shared(
133133
struct device *dev, const char *id)
134134
{
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);
136136
}
137137

138138
static inline struct reset_control *reset_control_get_optional_exclusive(
139139
struct device *dev, const char *id)
140140
{
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);
142142
}
143143

144144
static inline struct reset_control *reset_control_get_optional_shared(
145145
struct device *dev, const char *id)
146146
{
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);
148148
}
149149

150150
/**
@@ -185,7 +185,7 @@ static inline struct reset_control *of_reset_control_get_exclusive(
185185
static inline struct reset_control *of_reset_control_get_shared(
186186
struct device_node *node, const char *id)
187187
{
188-
return __of_reset_control_get(node, id, 0, 1);
188+
return __of_reset_control_get(node, id, 0, true);
189189
}
190190

191191
/**
@@ -202,7 +202,7 @@ static inline struct reset_control *of_reset_control_get_shared(
202202
static inline struct reset_control *of_reset_control_get_exclusive_by_index(
203203
struct device_node *node, int index)
204204
{
205-
return __of_reset_control_get(node, NULL, index, 0);
205+
return __of_reset_control_get(node, NULL, index, false);
206206
}
207207

208208
/**
@@ -230,7 +230,7 @@ static inline struct reset_control *of_reset_control_get_exclusive_by_index(
230230
static inline struct reset_control *of_reset_control_get_shared_by_index(
231231
struct device_node *node, int index)
232232
{
233-
return __of_reset_control_get(node, NULL, index, 1);
233+
return __of_reset_control_get(node, NULL, index, true);
234234
}
235235

236236
/**
@@ -252,7 +252,7 @@ __must_check devm_reset_control_get_exclusive(struct device *dev,
252252
#ifndef CONFIG_RESET_CONTROLLER
253253
WARN_ON(1);
254254
#endif
255-
return __devm_reset_control_get(dev, id, 0, 0);
255+
return __devm_reset_control_get(dev, id, 0, false);
256256
}
257257

258258
/**
@@ -267,19 +267,19 @@ __must_check devm_reset_control_get_exclusive(struct device *dev,
267267
static inline struct reset_control *devm_reset_control_get_shared(
268268
struct device *dev, const char *id)
269269
{
270-
return __devm_reset_control_get(dev, id, 0, 1);
270+
return __devm_reset_control_get(dev, id, 0, true);
271271
}
272272

273273
static inline struct reset_control *devm_reset_control_get_optional_exclusive(
274274
struct device *dev, const char *id)
275275
{
276-
return __devm_reset_control_get(dev, id, 0, 0);
276+
return __devm_reset_control_get(dev, id, 0, false);
277277
}
278278

279279
static inline struct reset_control *devm_reset_control_get_optional_shared(
280280
struct device *dev, const char *id)
281281
{
282-
return __devm_reset_control_get(dev, id, 0, 1);
282+
return __devm_reset_control_get(dev, id, 0, true);
283283
}
284284

285285
/**
@@ -297,7 +297,7 @@ static inline struct reset_control *devm_reset_control_get_optional_shared(
297297
static inline struct reset_control *
298298
devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
299299
{
300-
return __devm_reset_control_get(dev, NULL, index, 0);
300+
return __devm_reset_control_get(dev, NULL, index, false);
301301
}
302302

303303
/**
@@ -313,7 +313,7 @@ devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
313313
static inline struct reset_control *
314314
devm_reset_control_get_shared_by_index(struct device *dev, int index)
315315
{
316-
return __devm_reset_control_get(dev, NULL, index, 1);
316+
return __devm_reset_control_get(dev, NULL, index, true);
317317
}
318318

319319
/*

0 commit comments

Comments
 (0)