aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/device_sysfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c
index 24418932612e..a041689e5701 100644
--- a/drivers/acpi/device_sysfs.c
+++ b/drivers/acpi/device_sysfs.c
@@ -146,6 +146,10 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
146 int count; 146 int count;
147 struct acpi_hardware_id *id; 147 struct acpi_hardware_id *id;
148 148
149 /* Avoid unnecessarily loading modules for non present devices. */
150 if (!acpi_device_is_present(acpi_dev))
151 return 0;
152
149 /* 153 /*
150 * Since we skip ACPI_DT_NAMESPACE_HID from the modalias below, 0 should 154 * Since we skip ACPI_DT_NAMESPACE_HID from the modalias below, 0 should
151 * be returned if ACPI_DT_NAMESPACE_HID is the only ACPI/PNP ID in the 155 * be returned if ACPI_DT_NAMESPACE_HID is the only ACPI/PNP ID in the