summaryrefslogtreecommitdiffstats
path: root/drivers/reset
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-10-28 12:50:06 -0400
committerPhilipp Zabel <p.zabel@pengutronix.de>2017-11-27 03:16:39 -0500
commit1554bbd4ad401b7f0f916c0891874111c10befe5 (patch)
tree3cedce90a68898d0d9462957ea24eb59bb778ffc /drivers/reset
parent4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff)
reset: make device_reset_optional() really optional
Commit bb475230b8e5 ("reset: make optional functions really optional") converted *_get_optional* functions, but device_reset_optional() was left behind. Convert it in the same way. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/reset')
-rw-r--r--drivers/reset/core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/reset/core.c b/drivers/reset/core.c
index 1d21c6f7d56c..da4292e9de97 100644
--- a/drivers/reset/core.c
+++ b/drivers/reset/core.c
@@ -566,17 +566,18 @@ EXPORT_SYMBOL_GPL(__devm_reset_control_get);
566 * device_reset - find reset controller associated with the device 566 * device_reset - find reset controller associated with the device
567 * and perform reset 567 * and perform reset
568 * @dev: device to be reset by the controller 568 * @dev: device to be reset by the controller
569 * @optional: whether it is optional to reset the device
569 * 570 *
570 * Convenience wrapper for reset_control_get() and reset_control_reset(). 571 * Convenience wrapper for __reset_control_get() and reset_control_reset().
571 * This is useful for the common case of devices with single, dedicated reset 572 * This is useful for the common case of devices with single, dedicated reset
572 * lines. 573 * lines.
573 */ 574 */
574int device_reset(struct device *dev) 575int __device_reset(struct device *dev, bool optional)
575{ 576{
576 struct reset_control *rstc; 577 struct reset_control *rstc;
577 int ret; 578 int ret;
578 579
579 rstc = reset_control_get(dev, NULL); 580 rstc = __reset_control_get(dev, NULL, 0, 0, optional);
580 if (IS_ERR(rstc)) 581 if (IS_ERR(rstc))
581 return PTR_ERR(rstc); 582 return PTR_ERR(rstc);
582 583
@@ -586,7 +587,7 @@ int device_reset(struct device *dev)
586 587
587 return ret; 588 return ret;
588} 589}
589EXPORT_SYMBOL_GPL(device_reset); 590EXPORT_SYMBOL_GPL(__device_reset);
590 591
591/** 592/**
592 * APIs to manage an array of reset controls. 593 * APIs to manage an array of reset controls.