diff options
Diffstat (limited to '')
-rw-r--r-- | drivers/spmi/spmi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 7313d4c18a..93cd4a34de 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -388,13 +388,16 @@ 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 * + * Takes a reference to the embedded struct device which needs to be dropped + * after use. + * * 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); @@ -402,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 |