serdev: do not generate modaliases for controllers
authorJohan Hovold <johan@kernel.org>
Tue, 9 Jan 2018 16:09:16 +0000 (17:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jan 2018 13:17:44 +0000 (14:17 +0100)
commit2460942f51f1f262e77072c9a7c963a1b047a367
tree2069c4934252bd50cafab99d412714ba8a81520e
parentf8bdfe9d27350735d1cc787a5fd7c25078667496
serdev: do not generate modaliases for controllers

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.

Also add the missing static keyword for the modalias device attribute
when moving the definition.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c