aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRashika Kheria <rashika.kheria@gmail.com>2013-12-19 03:41:10 -0500
committerPhilipp Zabel <p.zabel@pengutronix.de>2014-02-03 04:19:40 -0500
commit0c5b2b915a5863643b4534dabd028d4bb34c3b27 (patch)
tree237118b6bcdd1ccd3255faa950ec6a04594cf4df
parent3d10302048ab672d1e8993b8a5b50d9e35881853 (diff)
reset: Mark function as static and remove unused function in core.c
Mark function of_reset_simple_xlate() as static in core.c because it is not used outside this file. Also, remove functions devm_reset_control_put() and devm_reset_control_match() because they are unused. This eliminates the following warnings in core.c: drivers/reset/core.c:46:5: warning: no previous prototype for ‘of_reset_simple_xlate’ [-Wmissing-prototypes] drivers/reset/core.c:262:6: warning: no previous prototype for ‘devm_reset_control_put’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-rw-r--r--drivers/reset/core.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index b3d99a1477b5..217d2fa4fd95 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -43,7 +43,7 @@ struct reset_control {
43 * This simple translation function should be used for reset controllers 43 * This simple translation function should be used for reset controllers
44 * with 1:1 mapping, where reset lines can be indexed by number without gaps. 44 * with 1:1 mapping, where reset lines can be indexed by number without gaps.
45 */ 45 */
46int of_reset_simple_xlate(struct reset_controller_dev *rcdev, 46static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
47 const struct of_phandle_args *reset_spec) 47 const struct of_phandle_args *reset_spec)
48{ 48{
49 if (WARN_ON(reset_spec->args_count != rcdev->of_reset_n_cells)) 49 if (WARN_ON(reset_spec->args_count != rcdev->of_reset_n_cells))
@@ -54,7 +54,6 @@ int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
54 54
55 return reset_spec->args[0]; 55 return reset_spec->args[0];
56} 56}
57EXPORT_SYMBOL_GPL(of_reset_simple_xlate);
58 57
59/** 58/**
60 * reset_controller_register - register a reset controller device 59 * reset_controller_register - register a reset controller device
@@ -243,33 +242,6 @@ struct reset_control *devm_reset_control_get(struct device *dev, const char *id)
243} 242}
244EXPORT_SYMBOL_GPL(devm_reset_control_get); 243EXPORT_SYMBOL_GPL(devm_reset_control_get);
245 244
246static int devm_reset_control_match(struct device *dev, void *res, void *data)
247{
248 struct reset_control **rstc = res;
249 if (WARN_ON(!rstc || !*rstc))
250 return 0;
251 return *rstc == data;
252}
253
254/**
255 * devm_reset_control_put - resource managed reset_control_put()
256 * @rstc: reset controller to free
257 *
258 * Deallocate a reset control allocated withd devm_reset_control_get().
259 * This function will not need to be called normally, as devres will take
260 * care of freeing the resource.
261 */
262void devm_reset_control_put(struct reset_control *rstc)
263{
264 int ret;
265
266 ret = devres_release(rstc->dev, devm_reset_control_release,
267 devm_reset_control_match, rstc);
268 if (ret)
269 WARN_ON(ret);
270}
271EXPORT_SYMBOL_GPL(devm_reset_control_put);
272
273/** 245/**
274 * device_reset - find reset controller associated with the device 246 * device_reset - find reset controller associated with the device
275 * and perform reset 247 * and perform reset