ACPI & Power Management Patches for Linux 3.5-rc1
Subsystems (8)
Len Brown
maintainerHere is my bug-fix queue for Linux-3.5-rc1 Please let me know if you have troubles with any of them, or if you have additional bug fixes that merit going upstream.
thanks,
Len Brown, Intel Open Source Technology Center
Len Brown
maintainerPATCH 1/15 ACPI battery: only refresh the sysfs files when pertinent information changes
From: Andy Whitcroft <[email protected]>
We only need to regenerate the sysfs files when the capacity units change, avoid the update otherwise.
The origin of this issue is dates way back to 2.6.38:da8aeb92d4853f37e281f11fddf61f9c7d84c3cd
(ACPI / Battery: Update information on info notification and resume)
--- drivers/acpi/battery.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/acpi/battery.c +9 -1
@@ -643,11 +643,19 @@ static int acpi_battery_update(struct acpi_battery *battery)static void acpi_battery_refresh (struct acpi_battery *battery) { +int power_unit; +if (!battery->bat.dev)return ; + power_unit = battery->power_unit; +acpi_battery_get_info (battery); -/* The battery may have changed its reporting units. */ + +if (power_unit == battery->power_unit) +return ; + +/* The battery has changed its reporting units. */ sysfs_remove_battery (battery);sysfs_add_battery (battery); }
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 2/15 ACPI: Ignore invalid _PSS entries, but use valid ones
In reply to Len BrownFrom: Marco Aurelio da Costa <[email protected]>
The EliteBook 8560W has non-initialized entries in its _PSS ACPI table. Instead of bailing out when the first non-initialized entry is found, ignore it and use only the valid entries. Only bail out if there is no valid entry at all.
[v3: Fixes suggested by Konrad]
--- drivers/acpi/processor_perflib.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-)
drivers/acpi/processor_perflib.c +25 -5
@@ -333,6 +333,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)struct acpi_buffer state = {0 ,NULL };union acpi_object *pss =NULL ;int i; +int last_invalid =-1 ; status =acpi_evaluate_object (pr->handle,"_PSS" ,NULL , &buffer);
@@ -394,14 +395,33 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) ((u32)(px->core_frequency * 1000) != (px->core_frequency * 1000))) { printk(KERN_ERR FW_BUG PREFIX -"Invalid BIOS _PSS frequency: 0x%llx MHz\n" , - px->core_frequency); - result = -EFAULT ; -kfree (pr->performance->states); - goto end; + "Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n", + pr->id, px->core_frequency); + if (last_invalid == -1) + last_invalid = i; + } else { +if (last_invalid !=-1 ) { +/* +* Copy this valid entry over last_invalid entry +*/ +memcpy (&(pr->performance->states[last_invalid]), + px,sizeof (struct acpi_processor_px )); + ++last_invalid; + } } } +if (last_invalid ==0 ) { + printk(KERN_ERR FW_BUG PREFIX + "No valid BIOS _PSS frequency found for processor %d\n", pr->id); + result = -EFAULT ; +kfree (pr->performance->states); + pr->performance->states =NULL ; + } + +if (last_invalid >0 ) + pr->performance->state_count = last_invalid; + end:kfree (buffer.pointer);
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 3/15 ACPI / PM: Generate wakeup events on fixed power button
In reply to Len BrownFrom: Daniel Drake <[email protected]>
When the system is woken up by the ACPI fixed power button, currently there is no way of userspace becoming aware that the power button was pressed.
OLPC would like to know this, so that we can respond appropriately. For example, if the system was woken up by a network packet, we know we can go back to sleep very quickly. But if the user explicitly woke the system with the power button, we're going to want to stay awake for a while.
The wakeup count mechanism seems like a good fit for communicating this. Mark the fixed power button as wakeup-enabled, and increment its wakeup counter when the system is woken with the power button. (The wakeup counter is also incremented when the power button is pressed during system operation; this is already handled by an existing acpi-button codepath).
--- drivers/acpi/scan.c | 1 + drivers/acpi/sleep.c | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-)
drivers/acpi/scan.c +1 -0
@@ -1567,6 +1567,7 @@ static int acpi_bus_scan_fixed(void)ACPI_BUS_TYPE_POWER_BUTTON ,ACPI_STA_DEFAULT , &ops); +device_init_wakeup (&device->dev, true); }if ((acpi_gbl_FADT.flags &ACPI_FADT_SLEEP_BUTTON ) ==0 ) {
drivers/acpi/sleep.c +43 -2
76 lines not on this page · raw message
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 4/15 rtc-cmos / PM: report wakeup event on ACPI RTC alarm
In reply to Len BrownFrom: Daniel Drake <[email protected]>
When the ACPI-driven RTC alarm wakes the system, report it as a wakeup event. This allows userspace to determine that the reason for system wakeup was RTC alarm.
--- drivers/rtc/rtc-cmos.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
drivers/rtc/rtc-cmos.c +6 -3
@@ -910,14 +910,17 @@ static inline int cmos_poweroff(struct device *dev)static u32 rtc_handler (void *context) { +struct device *dev = context; + +pm_wakeup_event (dev,0 );acpi_clear_event (ACPI_EVENT_RTC );acpi_disable_event (ACPI_EVENT_RTC ,0 );return ACPI_INTERRUPT_HANDLED ; } -static inline void rtc_wake_setup (void ) +static inline void rtc_wake_setup (struct device *dev) { -acpi_install_fixed_event_handler (ACPI_EVENT_RTC , rtc_handler,NULL ); +acpi_install_fixed_event_handler (ACPI_EVENT_RTC , rtc_handler, dev);/* * After the RTC handler is installed, the Fixed_RTC event should * be disabled. Only when the RTC alarm is set will it be enabled.
@@ -950,7 +953,7 @@ cmos_wake_setup(struct device *dev)if (acpi_disabled)return ; -rtc_wake_setup (); +rtc_wake_setup (dev); acpi_rtc_info.wake_on = rtc_wake_on; acpi_rtc_info.wake_off = rtc_wake_off;
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 5/15 ACPI / PM: Fix error messages in drivers/acpi/bus.c
In reply to Len BrownFrom: "Rafael J. Wysocki" <[email protected]>
After recent changes of the ACPI device low-power states definitions kernel messages in drivers/acpi/bus.c need to be updated so that they include the correct names of the states in question (currently is "D3" for D3hot and "D4" for D3cold, which is incorrect).
--- drivers/acpi/bus.c | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-)
drivers/acpi/bus.c +28 -9
@@ -182,6 +182,24 @@ EXPORT_SYMBOL(acpi_bus_get_private_data);Power Management -------------------------------------------------------------------------- */ +static const char *state_string (int state) +{ +switch (state) { +case ACPI_STATE_D0 : +return "D0" ; +case ACPI_STATE_D1 : +return "D1" ; +case ACPI_STATE_D2 : +return "D2" ; +case ACPI_STATE_D3_HOT : +return "D3hot" ; +case ACPI_STATE_D3_COLD : +return "D3" ; +default : +return "(unknown)" ; + } +} +static int __acpi_bus_get_power (struct acpi_device *device,int *state) {int result =0 ;
@@ -215,8 +233,8 @@ static int __acpi_bus_get_power(struct acpi_device *device, int *state) device->parent->power.state : ACPI_STATE_D0; } -ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Device [%s] power state is D%d\n" , - device->pnp.bus_id, *state)); +ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Device [%s] power state is %s\n" , + device->pnp.bus_id,state_string (*state)));return 0 ; }
@@ -234,13 +252,14 @@ static int __acpi_bus_set_power(struct acpi_device *device, int state)/* Make sure this is a valid target state */ if (state == device->power.state) { -ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Device is already at D%d\n" , - state)); +ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Device is already at %s\n" , +state_string (state)));return 0 ; }if (!device->power.states[state].flags.valid) { - printk(KERN_WARNING PREFIX "Device does not support D%d\n", state); + printk(KERN_WARNING PREFIX "Device does not support %s\n", + state_string(state));return -ENODEV ; }if (device->parent && (state < device->parent->power.state)) {
@@ -294,13 +313,13 @@ static int __acpi_bus_set_power(struct acpi_device *device, int state) end:if (result) printk(KERN_WARNING PREFIX -"Device [%s] failed to transition to D%d\n" , - device->pnp.bus_id, state); +"Device [%s] failed to transition to %s\n" , + device->pnp.bus_id,state_string (state));else { device->power.state = state;ACPI_DEBUG_PRINT ((ACPI_DB_INFO , -"Device [%s] transitioned to D%d\n" , - device->pnp.bus_id, state)); +"Device [%s] transitioned to %s\n" , + device->pnp.bus_id,state_string (state))); }return result;
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 6/15 ACPI / PM: Make __acpi_bus_get_power() cover D3cold correctly
In reply to Len BrownFrom: "Rafael J. Wysocki" <[email protected]>
After recent changes of the ACPI device power states definitions, if power resources are not used for the device's power management, the state returned by __acpi_bus_get_power() cannot exceed D3hot, because the return values of _PSC are 0 through 3. However, if the _PR3 method is not present for the device and _PS3 returns 3, we have to assume that the device is in D3cold, so the value returned by __acpi_bus_get_power() in that case should be 4.
Similarly, acpi_power_get_inferred_state() should take the power resources for the D3hot state into account in general, so that it can return 3 if those resources are "on" or 4 (D3cold) otherwise.
Fix the the above two issues and make sure that if both _PSC and _PR3 are present for the device, the power resources listed by _PR3 will be used to determine if the number 3 returned by _PSC is meant to represent D3cold or D3hot.
--- drivers/acpi/bus.c | 51 +++++++++++++++++++++++++++++---------------------- drivers/acpi/power.c | 2 +- 2 files changed, 30 insertions(+), 23 deletions(-)
drivers/acpi/bus.c +29 -22
@@ -202,37 +202,44 @@ static const char *state_string(int state)static int __acpi_bus_get_power (struct acpi_device *device,int *state) { -int result =0 ; -acpi_status status =0 ; -unsigned long long psc =0 ; +int result =ACPI_STATE_UNKNOWN ;if (!device || !state)return -EINVAL ; - *state =ACPI_STATE_UNKNOWN ; - -if (device->flags.power_manageable) { -/* -* Get the device's power state either directly (via _PSC) or -* indirectly (via power resources). -*/ -if (device->power.flags.power_resources) { - result =acpi_power_get_inferred_state (device, state); -if (result) -return result; - }else if (device->power.flags.explicit_get) { - status =acpi_evaluate_integer (device->handle,"_PSC" , -NULL , &psc); -if (ACPI_FAILURE (status)) -return -ENODEV ; - *state = (int )psc; - } - }else { +if (!device->flags.power_manageable) {/* TBD: Non-recursive algorithm for walking up hierarchy. */ *state = device->parent ? device->parent->power.state :ACPI_STATE_D0 ; + goto out; + } + +/* +* Get the device's power state either directly (via _PSC) or +* indirectly (via power resources). +*/ +if (device->power.flags.explicit_get) { +unsigned long long psc; +acpi_status status =acpi_evaluate_integer (device->handle, +"_PSC" ,NULL , &psc); +if (ACPI_FAILURE (status)) +return -ENODEV ; + + result = psc; + } +/* The test below covers ACPI_STATE_UNKNOWN too. */ +if (result <=ACPI_STATE_D2 ) { + ;/* Do nothing. */ + }else if (device->power.flags.power_resources) { +int error =acpi_power_get_inferred_state (device, &result); +if (error) +return error; + }else if (result ==ACPI_STATE_D3_HOT ) { + result =ACPI_STATE_D3 ; } + *state = result; + out:ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Device [%s] power state is %s\n" , device->pnp.bus_id,state_string (*state)));
drivers/acpi/power.c +1 -1
@@ -631,7 +631,7 @@ int acpi_power_get_inferred_state(struct acpi_device *device, int *state)* We know a device's inferred power state when all the resources * required for a given D-state are 'on'. */ -for (i =ACPI_STATE_D0 ; i <ACPI_STATE_D3_HOT ; i++) { +for (i =ACPI_STATE_D0 ; i <=ACPI_STATE_D3_HOT ; i++) { list = &device->power.states[i].resources;if (list->count <1 )continue ;
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 7/15 ACPI / PM: Make acpi_pm_device_sleep_state() follow the specification
In reply to Len BrownFrom: "Rafael J. Wysocki" <[email protected]>
The comparison between the system sleep state being entered and the lowest system sleep state the given device may wake up from in acpi_pm_device_sleep_state() is reversed, because the specification (ACPI 5.0) says that for wakeup to work:
"The sleeping state being entered must be less than or equal to the
power state declared in element 1 of the _PRW object."
In other words, the state returned by _PRW is the deepest (lowest-power) system sleep state the device is capable of waking up the system from.
Moreover, acpi_pm_device_sleep_state() also should check if the wakeup capability is supported through ACPI, because in principle it may be done via native PCIe PME, for example, in which case _SxW should not be evaluated.
--- drivers/acpi/sleep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/sleep.c +2 -2
@@ -773,8 +773,8 @@ int acpi_pm_device_sleep_state(struct device *dev, int *d_min_p)* can wake the system. _S0W may be valid, too. */ if (acpi_target_sleep_state ==ACPI_STATE_S0 || - (device_may_wakeup (dev) && - adev->wakeup.sleep_state <= acpi_target_sleep_state)) { + (device_may_wakeup (dev) && adev->wakeup.flags.valid && + adev->wakeup.sleep_state >= acpi_target_sleep_state)) {acpi_status status; acpi_method[3 ] ='W' ;
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 8/15 acpi_video: fix leaking PCI references
In reply to Len BrownFrom: Alan Cox <[email protected]>
--- drivers/acpi/video.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/acpi/video.c +3 -2
@@ -1745,6 +1745,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)static int __init intel_opregion_present (void ) { +int i915 =0 ;#if defined(CONFIG_DRM_I915 ) || defined(CONFIG_DRM_I915_MODULE )struct pci_dev *dev =NULL ;u32 address;
@@ -1757,10 +1758,10 @@ static int __init intel_opregion_present(void)pci_read_config_dword (dev,0xfc , &address);if (!address)continue ; - return 1; + i915 = 1; }#endif -return 0 ; +return i915; }int acpi_video_register (void )
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 9/15 acpi_video: Intel video is not always i915
In reply to Len BrownFrom: Alan Cox <[email protected]>
Stop it poking at random registers on the i740 cards that may be out there still.
As per Matthew's feedback remove the conditional checks and never enable the opregion handling unless an appropriate driver has been loaded.
--- drivers/acpi/video.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
drivers/acpi/video.c +15 -5
@@ -1743,10 +1743,18 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)return 0 ; } +static int __init is_i740 (struct pci_dev *dev) +{ +if (dev->device ==0x00D1 ) +return 1 ; +if (dev->device ==0x7000 ) +return 1 ; +return 0 ; +} +static int __init intel_opregion_present (void ) { -int i915 =0 ; -#if defined(CONFIG_DRM_I915 ) || defined(CONFIG_DRM_I915_MODULE ) +int opregion =0 ;struct pci_dev *dev =NULL ;u32 address;
@@ -1755,13 +1763,15 @@ static int __init intel_opregion_present(void)continue ;if (dev->vendor !=PCI_VENDOR_ID_INTEL )continue ; +/* We don't want to poke around undefined i740 registers */ +if (is_i740 (dev)) +continue ;pci_read_config_dword (dev,0xfc , &address);if (!address)continue ; - i915 = 1; + opregion =1 ; } -#endif -return i915; +return opregion; }int acpi_video_register (void )
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 10/15 gma500: don't register the ACPI video bus
In reply to Len BrownFrom: Alan Cox <[email protected]>
We are not yet ready for this and it makes a mess on some devices.
--- drivers/gpu/drm/gma500/psb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/gma500/psb_drv.c +1 -1
@@ -349,7 +349,7 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)PSB_WSGX32 (0x30000000 ,PSB_CR_BIF_3D_REQ_BASE );/* igd_opregion_init(&dev_priv->opregion_dev); */ -acpi_video_register (); +/* acpi_video_register(); */ if (dev_priv->lid_state)psb_lid_timer_init (dev_priv);
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 11/15 ACPI video: use after input_unregister_device()
In reply to Len BrownFrom: Dan Carpenter <[email protected]>
We can't use "input" anymore after calling input_unregister_device(). The call to input_free_device() is a double free. The normal way to deal with this is to make input_register_device() the last function called in the function.
--- drivers/acpi/video.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/acpi/video.c +7 -7
@@ -1687,10 +1687,6 @@ static int acpi_video_bus_add(struct acpi_device *device)set_bit (KEY_BRIGHTNESS_ZERO , input->keybit);set_bit (KEY_DISPLAY_OFF , input->keybit); - error =input_register_device (input); -if (error) - goto err_stop_video; - printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n",ACPI_VIDEO_DEVICE_NAME ,acpi_device_bid (device), video->flags.multihead ? "yes" : "no",
@@ -1701,12 +1697,16 @@ static int acpi_video_bus_add(struct acpi_device *device) video->pm_nb.priority =0 ; error =register_pm_notifier (&video->pm_nb);if (error) - goto err_unregister_input_dev; + goto err_stop_video; + + error =input_register_device (input); +if (error) + goto err_unregister_pm_notifier;return 0 ; - err_unregister_input_dev: -input_unregister_device (input); + err_unregister_pm_notifier: +unregister_pm_notifier (&video->pm_nb); err_stop_video:acpi_video_bus_stop_devices (video); err_free_input_dev:
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 12/15 tools/power turbostat: fix un-intended affinity of forked program
In reply to Len BrownFrom: Len Brown <[email protected]>
Linux 3.4 included a modification to turbostat to lower cross-call overhead by using scheduler affinity:
15aaa34654831e98dd76f7738b6c7f5d05a66430
(tools turbostat: reduce measurement overhead due to IPIs)
In the use-case where turbostat forks a child program, that change had the un-intended side-effect of binding the child to the last cpu in the system.
This change removed the binding before forking the child.
This is a back-port of a fix already included in turbostat v2.
--- tools/power/x86/turbostat/turbostat.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
tools/power/x86/turbostat/turbostat.c +26 -2
@@ -73,8 +73,8 @@ int backwards_count;char *progname;int num_cpus; -cpu_set_t *cpu_mask; -size_t cpu_mask_size; +cpu_set_t *cpu_present_set, *cpu_mask; +size_t cpu_present_setsize, cpu_mask_size;struct counters {unsigned long long tsc;/* per thread */
@@ -103,6 +103,12 @@ struct timeval tv_even;struct timeval tv_odd;struct timeval tv_delta; +int mark_cpu_present (int pkg,int core,int cpu) +{ +CPU_SET_S (cpu, cpu_present_setsize, cpu_present_set); +return 0 ; +} +/* * cpu_mask_init(ncpus) *
@@ -118,6 +124,18 @@ void cpu_mask_init(int ncpus) } cpu_mask_size =CPU_ALLOC_SIZE (ncpus);CPU_ZERO_S (cpu_mask_size, cpu_mask); + +/* +* Allocate and initialize cpu_present_set +*/ + cpu_present_set =CPU_ALLOC (ncpus); +if (cpu_present_set ==NULL ) { +perror ("CPU_ALLOC" ); +exit (3 ); + } + cpu_present_setsize =CPU_ALLOC_SIZE (ncpus); +CPU_ZERO_S (cpu_present_setsize, cpu_present_set); +for_all_cpus (mark_cpu_present); }void cpu_mask_uninit ()
@@ -125,6 +143,9 @@ void cpu_mask_uninit()CPU_FREE (cpu_mask); cpu_mask =NULL ; cpu_mask_size =0 ; +CPU_FREE (cpu_present_set); + cpu_present_set =NULL ; + cpu_present_setsize =0 ; }int cpu_migrate (int cpu)
@@ -1047,6 +1068,9 @@ int fork_it(char **argv)int retval;pid_t child_pid;get_counters (cnt_even); + +/* clear affinity side-effect of get_counters() */ +sched_setaffinity (0 , cpu_present_setsize, cpu_present_set);gettimeofday (&tv_even, (struct timezone *)NULL ); child_pid =fork ();
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 13/15 tools/power turbostat: fix IVB support
In reply to Len BrownFrom: Len Brown <[email protected]>
Initial IVB support went into turbostat in Linux-3.1:553575f1ae048aa44682b46b3c51929a0b3ad337 (tools turbostat: recognize and run properly on IVB)
However, when running on IVB, turbostat would fail to report the new couters added with SNB, c7, pc2 and pc7. So in scenarios where these counters are non-zero on IVB, turbostat would report erroneous residencey results.
In particular c7 time would be added to c1 time, since c1 time is calculated as "that which is left over".
Also, turbostat reports MHz capabilities when passed the "-v" option, and it would incorrectly report 133MHz bclk instead of 100MHz bclk for IVB, which would inflate GHz reported with that option.
This patch is a backport of a fix already included in turbostat v2.
--- tools/power/x86/turbostat/turbostat.c | 2 ++ 1 file changed, 2 insertions(+)
tools/power/x86/turbostat/turbostat.c +2 -0
@@ -933,6 +933,8 @@ int is_snb(unsigned int family, unsigned int model)switch (model) {case 0x2A :case 0x2D : +case 0x3A :/* IVB */ +case 0x3D :/* IVB Xeon */ return 1 ; }return 0 ;
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 14/15 drivers: acpi: Fix dependency for ACPI_HOTPLUG_CPU
In reply to Len BrownFrom: Fabio Estevam <[email protected]>
Fix the following build warning:
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI && EXPERIMENTAL)
--- drivers/acpi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/Kconfig +1 -1
@@ -208,7 +208,7 @@ config ACPI_IPMI config ACPI_HOTPLUG_CPU bool - depends on ACPI_PROCESSOR && HOTPLUG_CPU + depends on EXPERIMENTAL && ACPI_PROCESSOR && HOTPLUG_CPU select ACPI_CONTAINER default y
Signature · 1 line
1.7.11.rc0.100.g5498c5f
Len Brown
maintainerPATCH 15/15 ACPI: fix acpi_bus.h build warnings when ACPI is not enabled
In reply to Len BrownFrom: Len Brown <[email protected]>
introduced in Linux-3.5-rc1 by66886d6f8c9bcdee3d7fce5796dcffd6b4bc0b48
(ACPI: Add stubs for (un)register_acpi_bus_type)
Fix header file warnings when CONFIG_ACPI is not enabled:
include/acpi/acpi_bus.h:443:42: warning: 'struct acpi_bus_type' declared inside parameter list include/acpi/acpi_bus.h:443:42: warning: its scope is only this definition or declaration, which is probably not include/acpi/acpi_bus.h:444:44: warning: 'struct acpi_bus_type' declared inside parameter list
--- include/acpi/acpi_bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/acpi/acpi_bus.h +2 -2
@@ -440,8 +440,8 @@ static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable)#else /* CONFIG_ACPI */ -static int register_acpi_bus_type (struct acpi_bus_type *bus) {return 0 ; } -static int unregister_acpi_bus_type (struct acpi_bus_type *bus) {return 0 ; } +static inline int register_acpi_bus_type (void *bus) {return 0 ; } +static inline int unregister_acpi_bus_type (void *bus) {return 0 ; }#endif /* CONFIG_ACPI */
Signature · 1 line
1.7.11.rc0.100.g5498c5f