Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1189845 > unrolled thread
| Started by | Tomeu Vizoso <tomeu.vizoso@collabora.com> |
|---|---|
| First post | 2015-07-22 14:00 +0200 |
| Last post | 2015-07-22 14:00 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v1 05/10] device property: add fwnode_get_name() Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-07-22 14:00 +0200
| From | Tomeu Vizoso <tomeu.vizoso@collabora.com> |
|---|---|
| Date | 2015-07-22 14:00 +0200 |
| Subject | Re: [PATCH v1 05/10] device property: add fwnode_get_name() |
| Message-ID | <pP0QN-5Wa-7@gated-at.bofh.it> |
On 2 July 2015 at 01:38, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> On Tuesday, June 30, 2015 04:55:03 PM Tomeu Vizoso wrote:
>> Getting a textual representation of a device node can be very useful for
>> debugging.
>>
>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>
> Fine by me.
Thanks, Rafael. Is this a Reviewed-by?
Tomeu
>
>> ---
>>
>> drivers/base/property.c | 15 +++++++++++++++
>> include/linux/property.h | 2 ++
>> 2 files changed, 17 insertions(+)
>>
>> diff --git a/drivers/base/property.c b/drivers/base/property.c
>> index a7fb46b..3280b04 100644
>> --- a/drivers/base/property.c
>> +++ b/drivers/base/property.c
>> @@ -556,3 +556,18 @@ struct fwnode_handle *fwnode_get_parent(struct fwnode_handle *fwnode)
>> return NULL;
>> }
>> EXPORT_SYMBOL_GPL(fwnode_get_parent);
>> +
>> +/**
>> + * fwnode_get_name - return the name of a device node
>> + * @fwnode: Device node to find the name of
>> + */
>> +const char *fwnode_get_name(struct fwnode_handle *fwnode)
>> +{
>> + if (is_of_node(fwnode))
>> + return to_of_node(fwnode)->full_name;
>> + else if (is_acpi_node(fwnode))
>> + return acpi_dev_name(to_acpi_node(fwnode));
>> +
>> + return NULL;
>> +}
>> +EXPORT_SYMBOL_GPL(fwnode_get_name);
>> diff --git a/include/linux/property.h b/include/linux/property.h
>> index f47092d..020a53c 100644
>> --- a/include/linux/property.h
>> +++ b/include/linux/property.h
>> @@ -65,6 +65,8 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev,
>>
>> struct fwnode_handle *fwnode_get_parent(struct fwnode_handle *fwnode);
>>
>> +const char *fwnode_get_name(struct fwnode_handle *fwnode);
>> +
>> #define device_for_each_child_node(dev, child) \
>> for (child = device_get_next_child_node(dev, NULL); child; \
>> child = device_get_next_child_node(dev, child))
>>
>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web