diff options
author | Len Brown <len.brown@intel.com> | 2009-04-05 09:52:07 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-05 09:52:07 +0400 |
commit | 8a3f257c704e02aee9869decd069a806b45be3f1 (patch) | |
tree | adb9d3766c57119381304c3b94334997cc7a74a7 /drivers | |
parent | 33526a53600ac887d100e3c9b4be3637ac8ae3a5 (diff) | |
parent | 15065531c1c5902775ae3ade24eb37d0e688353b (diff) | |
download | linux-8a3f257c704e02aee9869decd069a806b45be3f1.tar.xz |
Merge branch 'misc' into release
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/dock.c | 3 | ||||
-rw-r--r-- | drivers/acpi/pci_irq.c | 16 | ||||
-rw-r--r-- | drivers/acpi/processor_throttling.c | 6 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 9 | ||||
-rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 9 | ||||
-rw-r--r-- | drivers/platform/x86/tc1100-wmi.c | 7 |
6 files changed, 29 insertions, 21 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 35094f230b1e..8f62fa01a9c7 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -1146,9 +1146,10 @@ static int __init dock_init(void) static void __exit dock_exit(void) { struct dock_station *dock_station; + struct dock_station *tmp; unregister_acpi_bus_notifier(&dock_acpi_notifier); - list_for_each_entry(dock_station, &dock_stations, sibiling) + list_for_each_entry_safe(dock_station, tmp, &dock_stations, sibiling) dock_remove(dock_station); } diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index be6b9093f8df..51b9f8280f88 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -86,7 +86,7 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(struct pci_dev *dev, } /* http://bugzilla.kernel.org/show_bug.cgi?id=4773 */ -static struct dmi_system_id medion_md9580[] = { +static const struct dmi_system_id medion_md9580[] = { { .ident = "Medion MD9580-F laptop", .matches = { @@ -98,7 +98,7 @@ static struct dmi_system_id medion_md9580[] = { }; /* http://bugzilla.kernel.org/show_bug.cgi?id=5044 */ -static struct dmi_system_id dell_optiplex[] = { +static const struct dmi_system_id dell_optiplex[] = { { .ident = "Dell Optiplex GX1", .matches = { @@ -110,7 +110,7 @@ static struct dmi_system_id dell_optiplex[] = { }; /* http://bugzilla.kernel.org/show_bug.cgi?id=10138 */ -static struct dmi_system_id hp_t5710[] = { +static const struct dmi_system_id hp_t5710[] = { { .ident = "HP t5710", .matches = { @@ -123,13 +123,13 @@ static struct dmi_system_id hp_t5710[] = { }; struct prt_quirk { - struct dmi_system_id *system; + const struct dmi_system_id *system; unsigned int segment; unsigned int bus; unsigned int device; unsigned char pin; - char *source; /* according to BIOS */ - char *actual_source; + const char *source; /* according to BIOS */ + const char *actual_source; }; #define PCI_INTX_PIN(c) (c - 'A' + 1) @@ -139,7 +139,7 @@ struct prt_quirk { * interrupt at the listed segment/bus/device/pin is connected to the first * link device, but it is actually connected to the second. */ -static struct prt_quirk prt_quirks[] = { +static const struct prt_quirk prt_quirks[] = { { medion_md9580, 0, 0, 9, PCI_INTX_PIN('A'), "\\_SB_.PCI0.ISA_.LNKA", "\\_SB_.PCI0.ISA_.LNKB"}, @@ -155,7 +155,7 @@ static void do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt) { int i; - struct prt_quirk *quirk; + const struct prt_quirk *quirk; for (i = 0; i < ARRAY_SIZE(prt_quirks); i++) { quirk = &prt_quirks[i]; diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 73aed5f5b973..d0d1f4d50434 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -783,11 +783,9 @@ static int acpi_get_throttling_state(struct acpi_processor *pr, (struct acpi_processor_tx_tss *)&(pr->throttling. states_tss[i]); if (tx->control == value) - break; + return i; } - if (i > pr->throttling.state_count) - i = -1; - return i; + return -1; } static int acpi_get_throttling_value(struct acpi_processor *pr, diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 91a284b54dbf..779e4e500df4 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -396,6 +396,15 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), }, }, + { + .callback = init_old_suspend_ordering, + .ident = "Panasonic CF51-2L", + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, + "Matsushita Electric Industrial Co.,Ltd."), + DMI_MATCH(DMI_BOARD_NAME, "CF51-2L"), + }, + }, {}, }; #endif /* CONFIG_SUSPEND */ diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index c47a44dcb702..a5ce4bc202e3 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -184,6 +184,7 @@ static const struct acpi_device_id pcc_device_ids[] = { { "MAT0019", 0}, { "", 0}, }; +MODULE_DEVICE_TABLE(acpi, pcc_device_ids); static struct acpi_driver acpi_pcc_driver = { .name = ACPI_PCC_DRIVER_NAME, @@ -366,7 +367,7 @@ static ssize_t show_numbatt(struct device *dev, struct device_attribute *attr, if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) return -EIO; - return sprintf(buf, "%u\n", pcc->sinf[SINF_NUM_BATTERIES]); + return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_NUM_BATTERIES]); } static ssize_t show_lcdtype(struct device *dev, struct device_attribute *attr, @@ -378,7 +379,7 @@ static ssize_t show_lcdtype(struct device *dev, struct device_attribute *attr, if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) return -EIO; - return sprintf(buf, "%u\n", pcc->sinf[SINF_LCD_TYPE]); + return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_LCD_TYPE]); } static ssize_t show_mute(struct device *dev, struct device_attribute *attr, @@ -390,7 +391,7 @@ static ssize_t show_mute(struct device *dev, struct device_attribute *attr, if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) return -EIO; - return sprintf(buf, "%u\n", pcc->sinf[SINF_MUTE]); + return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_MUTE]); } static ssize_t show_sticky(struct device *dev, struct device_attribute *attr, @@ -402,7 +403,7 @@ static ssize_t show_sticky(struct device *dev, struct device_attribute *attr, if (!acpi_pcc_retrieve_biosdata(pcc, pcc->sinf)) return -EIO; - return sprintf(buf, "%u\n", pcc->sinf[SINF_STICKY_KEY]); + return snprintf(buf, PAGE_SIZE, "%u\n", pcc->sinf[SINF_STICKY_KEY]); } static ssize_t set_sticky(struct device *dev, struct device_attribute *attr, diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c index b4a4aa9ee482..44166003d4ef 100644 --- a/drivers/platform/x86/tc1100-wmi.c +++ b/drivers/platform/x86/tc1100-wmi.c @@ -94,9 +94,8 @@ static int get_state(u32 *out, u8 instance) return -ENODEV; obj = (union acpi_object *) result.pointer; - if (obj && obj->type == ACPI_TYPE_BUFFER && - obj->buffer.length == sizeof(u32)) { - tmp = *((u32 *) obj->buffer.pointer); + if (obj && obj->type == ACPI_TYPE_INTEGER) { + tmp = obj->integer.value; } else { tmp = 0; } @@ -109,7 +108,7 @@ static int get_state(u32 *out, u8 instance) *out = (tmp == 3) ? 1 : 0; return 0; case TC1100_INSTANCE_JOGDIAL: - *out = (tmp == 1) ? 1 : 0; + *out = (tmp == 1) ? 0 : 1; return 0; default: return -ENODEV; |