summaryrefslogtreecommitdiffstats
path: root/drivers/spmi/spmi.c
diff options
context:
space:
mode:
authorJohan Hovold <johan+linaro@kernel.org>2023-10-03 17:29:27 +0200
committerLee Jones <lee@kernel.org>2023-11-01 11:02:18 +0100
commit272f99edab36974b58347e97ee105885e385fa88 (patch)
treedcda53ea1a638d3046f03019afccb0f22b1e4e59 /drivers/spmi/spmi.c
parentspmi: document spmi_device_from_of() refcounting (diff)
downloadlinux-272f99edab36974b58347e97ee105885e385fa88.tar.xz
linux-272f99edab36974b58347e97ee105885e385fa88.zip
spmi: rename spmi device lookup helper
Rename the SPMI device helper which is used to lookup a device from its OF node as spmi_find_device_by_of_node() so that it reflects the implementation and matches how other helpers like this are named. This will specifically make it more clear that this is a lookup function which returns a reference counted structure. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20231003152927.15000-6-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/spmi/spmi.c')
-rw-r--r--drivers/spmi/spmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index ca2fd4d72fa6..93cd4a34debc 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -388,7 +388,7 @@ static struct bus_type spmi_bus_type = {
};
/**
- * spmi_device_from_of() - get the associated SPMI device from a device node
+ * spmi_find_device_by_of_node() - look up an SPMI device from a device node
*
* @np: device node
*
@@ -397,7 +397,7 @@ static struct bus_type spmi_bus_type = {
*
* Returns the struct spmi_device associated with a device node or NULL.
*/
-struct spmi_device *spmi_device_from_of(struct device_node *np)
+struct spmi_device *spmi_find_device_by_of_node(struct device_node *np)
{
struct device *dev = bus_find_device_by_of_node(&spmi_bus_type, np);
@@ -405,7 +405,7 @@ struct spmi_device *spmi_device_from_of(struct device_node *np)
return to_spmi_device(dev);
return NULL;
}
-EXPORT_SYMBOL_GPL(spmi_device_from_of);
+EXPORT_SYMBOL_GPL(spmi_find_device_by_of_node);
/**
* spmi_device_alloc() - Allocate a new SPMI device