Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478727
| From | spjoshi@codeaurora.org |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 02/17] rpmsg: Name rpmsg devices based on channel id |
| Date | 2016-09-08 03:50 +0200 |
| Message-ID | <seWDv-7Jo-5@gated-at.bofh.it> (permalink) |
| References | <scIEG-7Nd-3@gated-at.bofh.it> <scIOm-7Qu-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016-09-01 15:27, Bjorn Andersson wrote:
> By basing rpmsg device names on channel id we end up with human
> readable
> device names in sysfs and debug logs.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>
> Changes since v1:
> - None
>
> drivers/rpmsg/virtio_rpmsg_bus.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c
> b/drivers/rpmsg/virtio_rpmsg_bus.c
> index 495fa0a282d3..c4bd89ea7681 100644
> --- a/drivers/rpmsg/virtio_rpmsg_bus.c
> +++ b/drivers/rpmsg/virtio_rpmsg_bus.c
> @@ -136,14 +136,6 @@ rpmsg_show_attr(src, src, "0x%x\n");
> rpmsg_show_attr(dst, dst, "0x%x\n");
> rpmsg_show_attr(announce, announce ? "true" : "false", "%s\n");
>
> -/*
> - * Unique (and free running) index for rpmsg devices.
> - *
> - * Yeah, we're not recycling those numbers (yet?). will be easy
> - * to change if/when we want to.
> - */
> -static unsigned int rpmsg_dev_index;
> -
> static ssize_t modalias_show(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> @@ -531,8 +523,8 @@ static struct rpmsg_channel
> *rpmsg_create_channel(struct virtproc_info *vrp,
>
> strncpy(rpdev->id.name, chinfo->name, RPMSG_NAME_SIZE);
>
> - /* very simple device indexing plumbing which is enough for now */
> - dev_set_name(&rpdev->dev, "rpmsg%d", rpmsg_dev_index++);
> + dev_set_name(&rpdev->dev, "%s:%s",
> + dev_name(dev->parent), rpdev->id.name);
>
> rpdev->dev.parent = &vrp->vdev->dev;
> rpdev->dev.bus = &rpmsg_bus;
Reviewed-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
Sarang
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/17] Make rpmsg a framework Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:30 +0200
[PATCH v2 12/17] rpmsg: Split rpmsg core and virtio backend Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:30 +0200
[PATCH v2 01/17] rpmsg: Enable matching devices with drivers based on DT Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers based on DT spjoshi@codeaurora.org - 2016-09-08 03:50 +0200
Re: [PATCH v2 01/17] rpmsg: Enable matching devices with drivers based on DT Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-09 06:40 +0200
[PATCH v2 05/17] rpmsg: Clean up rpmsg device vs channel naming Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
[PATCH v2 11/17] rpmsg: Split off generic tail of create_channel() Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
[PATCH v2 02/17] rpmsg: Name rpmsg devices based on channel id Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
Re: [PATCH v2 02/17] rpmsg: Name rpmsg devices based on channel id spjoshi@codeaurora.org - 2016-09-08 03:50 +0200
[PATCH v2 10/17] rpmsg: Move helper for finding rpmsg devices to core Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
[PATCH v2 06/17] rpmsg: Introduce indirection table for rpmsg_device operations Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
[PATCH v2 09/17] rpmsg: Move endpoint related interface to rpmsg core Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
[PATCH v2 13/17] rpmsg: Hide rpmsg indirection tables Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
[PATCH v2 04/17] rpmsg: Make rpmsg_create_ept() take channel_info struct Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-09-02 00:40 +0200
csiph-web