aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudeep Holla <Sudeep.Holla@arm.com>2015-09-14 11:01:55 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-14 21:05:45 -0400
commitbcb2b0b2bae2de744223c68521cd51c57feb486c (patch)
tree37193684c8ba60ca6f9212479844b7378b0f820b
parentcf3a51059efd653aa38667db799e85d77231af9d (diff)
ACPI: Eliminate CONFIG_.*{, _MODULE} #ifdef in favor of IS_ENABLED()
This commit removes all CONFIG_.*{,_MODULE} in ACPI code, replacing it with IS_ENABLED(). Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/bus.c12
-rw-r--r--drivers/acpi/int340x_thermal.c9
-rw-r--r--include/acpi/button.h4
-rw-r--r--include/acpi/video.h2
4 files changed, 11 insertions, 16 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 46506e7687cd..a212cefae524 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -315,14 +315,10 @@ static void acpi_bus_osc_support(void)
315 315
316 capbuf[OSC_QUERY_DWORD] = OSC_QUERY_ENABLE; 316 capbuf[OSC_QUERY_DWORD] = OSC_QUERY_ENABLE;
317 capbuf[OSC_SUPPORT_DWORD] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */ 317 capbuf[OSC_SUPPORT_DWORD] = OSC_SB_PR3_SUPPORT; /* _PR3 is in use */
318#if defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) ||\ 318 if (IS_ENABLED(CONFIG_ACPI_PROCESSOR_AGGREGATOR))
319 defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE) 319 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT;
320 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PAD_SUPPORT; 320 if (IS_ENABLED(CONFIG_ACPI_PROCESSOR))
321#endif 321 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT;
322
323#if defined(CONFIG_ACPI_PROCESSOR) || defined(CONFIG_ACPI_PROCESSOR_MODULE)
324 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_PPC_OST_SUPPORT;
325#endif
326 322
327 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT; 323 capbuf[OSC_SUPPORT_DWORD] |= OSC_SB_HOTPLUG_OST_SUPPORT;
328 324
diff --git a/drivers/acpi/int340x_thermal.c b/drivers/acpi/int340x_thermal.c
index 6c7c7975f72e..33505c651f62 100644
--- a/drivers/acpi/int340x_thermal.c
+++ b/drivers/acpi/int340x_thermal.c
@@ -33,13 +33,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
33static int int340x_thermal_handler_attach(struct acpi_device *adev, 33static int int340x_thermal_handler_attach(struct acpi_device *adev,
34 const struct acpi_device_id *id) 34 const struct acpi_device_id *id)
35{ 35{
36#if defined(CONFIG_INT340X_THERMAL) || defined(CONFIG_INT340X_THERMAL_MODULE) 36 if (IS_ENABLED(CONFIG_INT340X_THERMAL))
37 acpi_create_platform_device(adev); 37 acpi_create_platform_device(adev);
38#elif defined(CONFIG_INTEL_SOC_DTS_THERMAL) || defined(CONFIG_INTEL_SOC_DTS_THERMAL_MODULE)
39 /* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */ 38 /* Intel SoC DTS thermal driver needs INT3401 to set IRQ descriptor */
40 if (id->driver_data == INT3401_DEVICE) 39 else if (IS_ENABLED(CONFIG_INTEL_SOC_DTS_THERMAL) &&
40 id->driver_data == INT3401_DEVICE)
41 acpi_create_platform_device(adev); 41 acpi_create_platform_device(adev);
42#endif
43 return 1; 42 return 1;
44} 43}
45 44
diff --git a/include/acpi/button.h b/include/acpi/button.h
index 97eea0e4c016..1cad8b2d460c 100644
--- a/include/acpi/button.h
+++ b/include/acpi/button.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/notifier.h> 4#include <linux/notifier.h>
5 5
6#if defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) 6#if IS_ENABLED(CONFIG_ACPI_BUTTON)
7extern int acpi_lid_notifier_register(struct notifier_block *nb); 7extern int acpi_lid_notifier_register(struct notifier_block *nb);
8extern int acpi_lid_notifier_unregister(struct notifier_block *nb); 8extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
9extern int acpi_lid_open(void); 9extern int acpi_lid_open(void);
@@ -20,6 +20,6 @@ static inline int acpi_lid_open(void)
20{ 20{
21 return 1; 21 return 1;
22} 22}
23#endif /* defined(CONFIG_ACPI_BUTTON) || defined(CONFIG_ACPI_BUTTON_MODULE) */ 23#endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
24 24
25#endif /* ACPI_BUTTON_H */ 25#endif /* ACPI_BUTTON_H */
diff --git a/include/acpi/video.h b/include/acpi/video.h
index e840b294c6f5..c62392d9b52a 100644
--- a/include/acpi/video.h
+++ b/include/acpi/video.h
@@ -24,7 +24,7 @@ enum acpi_backlight_type {
24 acpi_backlight_native, 24 acpi_backlight_native,
25}; 25};
26 26
27#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) 27#if IS_ENABLED(CONFIG_ACPI_VIDEO)
28extern int acpi_video_register(void); 28extern int acpi_video_register(void);
29extern void acpi_video_unregister(void); 29extern void acpi_video_unregister(void);
30extern int acpi_video_get_edid(struct acpi_device *device, int type, 30extern int acpi_video_get_edid(struct acpi_device *device, int type,