From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Johan Hovold" <johan@kernel.org>,
"Rob Herring" <robh@kernel.org>, "Jiri Slaby" <jslaby@suse.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Frédéric Danis" <frederic.danis.oss@gmail.com>
Subject: Re: [PATCH 1/2] serdev: do not generate modaliases for controllers
Date: Tue, 9 Jan 2018 16:56:02 +0100 [thread overview]
Message-ID: <20180109155602.GU11344@localhost> (raw)
In-Reply-To: <20180109154803.GA10213@kroah.com>
On Tue, Jan 09, 2018 at 04:48:03PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Jan 08, 2018 at 01:42:32PM +0100, Johan Hovold wrote:
> > Serdev controllers are not bound to any drivers and it therefore makes
> > no sense to generate modaliases for them.
> >
> > This has already been fixed separately for ACPI controllers for which
> > uevent errors were also being logged during probe due to the missing
> > ACPI companions (from which ACPI modaliases are generated).
> >
> > This patch moves the modalias handling from the bus type to the client
> > device type. Specifically, this means that only serdev devices (a.k.a.
> > clients or slaves) will have have MODALIAS fields in their uevent
> > environments and corresponding modalias sysfs attributes.
> >
> > Reported-by: Hans de Goede <hdegoede@redhat.com>
> > Signed-off-by: Johan Hovold <johan@kernel.org>
> > ---
> > drivers/tty/serdev/core.c | 72 ++++++++++++++++++++++-------------------------
> > 1 file changed, 34 insertions(+), 38 deletions(-)
> >
> > diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> > index 5dc88f61f506..61c85e49e178 100644
> > --- a/drivers/tty/serdev/core.c
> > +++ b/drivers/tty/serdev/core.c
> > @@ -19,6 +19,38 @@
> > static bool is_registered;
> > static DEFINE_IDA(ctrl_ida);
> >
> > +static ssize_t modalias_show(struct device *dev,
> > + struct device_attribute *attr, char *buf)
> > +{
> > + int len;
> > +
> > + len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1);
> > + if (len != -ENODEV)
> > + return len;
> > +
> > + return of_device_modalias(dev, buf, PAGE_SIZE);
> > +}
> > +DEVICE_ATTR_RO(modalias);
>
> static?
>
> Sorry, minor nit :(
Heh, no worries. I didn't notice that as I was just moving code around
here, but I'll make sure to add that missing static in a v2.
Thanks,
Johan
next prev parent reply other threads:[~2018-01-09 15:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 12:42 [PATCH 0/2] serdev: bus-code clean ups Johan Hovold
2018-01-08 12:42 ` [PATCH 1/2] serdev: do not generate modaliases for controllers Johan Hovold
2018-01-09 15:48 ` Greg Kroah-Hartman
2018-01-09 15:56 ` Johan Hovold [this message]
2018-01-08 12:42 ` [PATCH 2/2] serdev: only match serdev devices Johan Hovold
2018-01-08 13:50 ` [PATCH 0/2] serdev: bus-code clean ups Johan Hovold
2018-01-09 15:48 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180109155602.GU11344@localhost \
--to=johan@kernel.org \
--cc=frederic.danis.oss@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).