]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Dec 2018 12:05:08 +0000 (13:05 +0100)
commitee6e7fba7f45eaa533639ac7489afabb97d2e6ee
treee2aaf69034c99dabf94329261a2177688d9bb2be
parent7be26008ef1742ed0d26ca1a3ff69d58b793e511
reset: add exported __reset_control_get, return NULL if optional

commit 62e24c5775ecb387a3eb33701378ccfa6dbc98ee upstream.

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: bb475230b8e5 ("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>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/reset/core.c
include/linux/reset.h