aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/Kconfig3
-rw-r--r--drivers/acpi/Makefile2
-rw-r--r--drivers/acpi/sbs.c2
-rw-r--r--drivers/acpi/sbshc.c6
-rw-r--r--drivers/cpuidle/cpuidle.c13
-rw-r--r--drivers/misc/Kconfig3
-rw-r--r--drivers/misc/acer-wmi.c6
-rw-r--r--include/linux/thermal.h23
8 files changed, 47 insertions, 11 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 65a70b777c1..a64d532dff4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -102,6 +102,9 @@ config ARCH_HAS_ILOG2_U32
config ARCH_HAS_ILOG2_U64
def_bool n
+config ARCH_HAS_CPU_IDLE_WAIT
+ def_bool y
+
config GENERIC_CALIBRATE_DELAY
def_bool y
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index f29812a8653..40b0fcae4c7 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -60,5 +60,5 @@ obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o
obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
obj-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
-obj-$(CONFIG_ACPI_SBS) += sbs.o
obj-$(CONFIG_ACPI_SBS) += sbshc.o
+obj-$(CONFIG_ACPI_SBS) += sbs.o
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 1194105cc3c..585ae3c9c8e 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -827,7 +827,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
#endif
printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
- battery->name, sbs->battery->present ? "present" : "absent");
+ battery->name, battery->present ? "present" : "absent");
return result;
}
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index ae9a90438e2..a2cf3008ce6 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -117,6 +117,11 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
int ret = -EFAULT, i;
u8 temp, sz = 0;
+ if (!hc) {
+ printk(KERN_ERR PREFIX "host controller is not configured\n");
+ return ret;
+ }
+
mutex_lock(&hc->lock);
if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
goto end;
@@ -292,6 +297,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type)
hc = acpi_driver_data(device);
acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
kfree(hc);
+ acpi_driver_data(device) = NULL;
return 0;
}
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 2c4b2d47973..60f71e6345e 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -27,6 +27,17 @@ static void (*pm_idle_old)(void);
static int enabled_devices;
+#if defined(CONFIG_ARCH_HAS_CPU_IDLE_WAIT)
+static void cpuidle_kick_cpus(void)
+{
+ cpu_idle_wait();
+}
+#elif defined(CONFIG_SMP)
+# error "Arch needs cpu_idle_wait() equivalent here"
+#else /* !CONFIG_ARCH_HAS_CPU_IDLE_WAIT && !CONFIG_SMP */
+static void cpuidle_kick_cpus(void) {}
+#endif
+
/**
* cpuidle_idle_call - the main idle loop
*
@@ -83,7 +94,7 @@ void cpuidle_uninstall_idle_handler(void)
{
if (enabled_devices && (pm_idle != pm_idle_old)) {
pm_idle = pm_idle_old;
- cpu_idle_wait();
+ cpuidle_kick_cpus();
}
}
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 92a85eecab0..1abc95ca9df 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -155,8 +155,9 @@ config FUJITSU_LAPTOP
If you have a Fujitsu laptop, say Y or M here.
config TC1100_WMI
- tristate "HP Compaq TC1100 Tablet WMI Extras"
+ tristate "HP Compaq TC1100 Tablet WMI Extras (EXPERIMENTAL)"
depends on X86 && !X86_64
+ depends on EXPERIMENTAL
depends on ACPI
select ACPI_WMI
---help---
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index a4d67750425..d7aea93081f 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -428,11 +428,9 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface)
if (value > max_brightness)
return AE_BAD_PARAMETER;
switch (quirks->brightness) {
- case 1:
- return ec_write(0x83, value);
default:
- return AE_BAD_ADDRESS;
- break;
+ return ec_write(0x83, value);
+ break;
}
default:
return AE_BAD_ADDRESS;
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index bba7712cadc..818ca1cf0b6 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -79,7 +79,9 @@ struct thermal_zone_device {
};
struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
- struct thermal_zone_device_ops *);
+ struct
+ thermal_zone_device_ops
+ *);
void thermal_zone_device_unregister(struct thermal_zone_device *);
int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
@@ -87,8 +89,23 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
struct thermal_cooling_device *);
+#ifdef CONFIG_THERMAL
struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
- struct thermal_cooling_device_ops *);
+ struct
+ thermal_cooling_device_ops
+ *);
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
+#else
+static inline struct thermal_cooling_device
+*thermal_cooling_device_register(char *c, void *v,
+ struct thermal_cooling_device_ops *t)
+{
+ return NULL;
+}
+static inline
+ void thermal_cooling_device_unregister(struct thermal_cooling_device *t)
+{
+};
+#endif
-#endif /* __THERMAL_H__ */
+#endif /* __THERMAL_H__ */