lkml.org 
[lkml]   [2018]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 01/11] ACPI / LPSS: Add guards against CONFIG_PCI
Date
We can now compile ACPI without PCI support. If code depends on CONFIG_PCI,
it needs to explicitly guard that piece.

Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
drivers/acpi/acpi_lpss.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index 5f94c35d165f..4148abcdf9ef 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -534,8 +534,11 @@ static struct device *acpi_lpss_find_device(const char *hid, const char *uid)
dev = bus_find_device(&platform_bus_type, NULL, &data, match_hid_uid);
if (dev)
return dev;
-
+#ifdef CONFIG_PCI
return bus_find_device(&pci_bus_type, NULL, &data, match_hid_uid);
+#else
+ return NULL;
+#endif
}

static bool acpi_lpss_dep(struct acpi_device *adev, acpi_handle handle)
--
2.19.0
\
 
 \ /
  Last update: 2018-12-22 18:50    [W:0.035 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site