]> 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)
commitf2616ee268d605225c25d72d46eefa6ae4eb9190
treedff24c4039d490ce213ee87009763200e830dac3
parent4586ff429d3108b859bcde5b17008d835a0b14dd
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