]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / bus: Leave modalias empty for devices which are not present
authorHans de Goede <hdegoede@redhat.com>
Sun, 15 Oct 2017 19:24:49 +0000 (21:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Nov 2017 22:48:51 +0000 (23:48 +0100)
commit63703e72ba3c9a9a57cf7d0ee12b3c3ecdddce58
treedff24c4039d490ce213ee87009763200e830dac3
parent30407f07e0c5ab9d85aa994e7fddc0e010b48832
ACPI / bus: Leave modalias empty for devices which are not present

Most Bay and Cherry Trail devices use a generic DSDT with all possible
peripheral devices present in the DSDT, with their _STA returning 0x00 or
0x0f based on AML variables which describe what is actually present on
the board.

Since ACPI device objects with a 0x00 status (not present) still get an
entry under /sys/bus/acpi/devices, and those entry had an acpi:PNPID
modalias, userspace would end up loading modules for non present hardware.

This commit fixes this by leaving the modalias empty for non present
devices. This results in 10 modules less being loaded with a generic
distro kernel config on my Cherry Trail test-device (a GPD pocket).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/device_sysfs.c