]> git.baikalelectronics.ru Git - kernel.git/commit
reset: add exported __reset_control_get, return NULL if optional
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 5 Feb 2016 12:41:39 +0000 (13:41 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 4 Apr 2017 15:36:10 +0000 (17:36 +0200)
commitc88b5ac784ef38589306802f372c8c7f5092e730
tree66b088d3862e20b8680fa7982b9902d83092df40
parent201694e7aa79acd3b131e7401ee315cc1154da24
reset: add exported __reset_control_get, return NULL if optional

Rename the internal __reset_control_get/put functions to
__reset_control_get/put_internal and add an exported
__reset_control_get equivalent to __of_reset_control_get
that takes a struct device parameter.
This avoids the confusing call to __of_reset_control_get in
the non-DT case and fixes the devm_reset_control_get_optional
function to return NULL if RESET_CONTROLLER is enabled but
dev->of_node == NULL.

Fixes: 57b2f37eee5d ("reset: make optional functions really optional")
Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/reset/core.c
include/linux/reset.h