Commit fcb11235 authored by Len Brown's avatar Len Brown

Merge branch 'misc-2.6.33' into release

parents 78a5331d 44ef00e6
......@@ -3652,6 +3652,11 @@ W: http://0pointer.de/lennart/tchibo.html
S: Maintained
F: drivers/platform/x86/msi-laptop.c
MSI WMI SUPPORT
M: Anisse Astier <anisse@astier.eu>
S: Supported
F: drivers/platform/x86/msi-wmi.c
MULTIFUNCTION DEVICES (MFD)
M: Samuel Ortiz <sameo@linux.intel.com>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
......
......@@ -190,9 +190,11 @@ static void do_drv_write(void *_cmd)
static void drv_read(struct drv_cmd *cmd)
{
int err;
cmd->val = 0;
smp_call_function_single(cpumask_any(cmd->mask), do_drv_read, cmd, 1);
err = smp_call_function_any(cmd->mask, do_drv_read, cmd, 1);
WARN_ON_ONCE(err); /* smp_call_function_any() was buggy? */
}
static void drv_write(struct drv_cmd *cmd)
......
......@@ -40,7 +40,6 @@ config ATA_VERBOSE_ERROR
config ATA_ACPI
bool "ATA ACPI Support"
depends on ACPI && PCI
select ACPI_DOCK
default y
help
This option adds support for ATA-related ACPI objects.
......
......@@ -96,9 +96,6 @@ struct acer_quirks {
MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB");
MODULE_ALIAS("wmi:6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3");
/* Temporary workaround until the WMI sysfs interface goes in */
MODULE_ALIAS("dmi:*:*Acer*:*:");
/*
* Interface capability flags
*/
......
......@@ -52,7 +52,7 @@
*/
#undef START_IN_KERNEL_MODE
#define DRV_VER "0.5.20"
#define DRV_VER "0.5.22"
/*
* According to the Atom N270 datasheet,
......@@ -156,19 +156,25 @@ static const struct bios_settings_t bios_tbl[] = {
{"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x20, 0x00} },
/* Acer 1410 */
{"Acer", "Aspire 1410", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
/* special BIOS / other */
{"Acer", "Aspire 1410", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
/* Acer 1810xx */
{"Acer", "Aspire 1810TZ", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
{"Acer", "Aspire 1810T", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
{"Acer", "Aspire 1810T", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
{"Acer", "Aspire 1810TZ", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
/* Gateway */
{"Gateway", "AOA110", "v0.3103", 0x55, 0x58, {0x21, 0x21, 0x00} },
{"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x20, 0x00} },
{"Gateway ", "LT31 ", "v1.3103 ", 0x55, 0x58,
{0x10, 0x0f, 0x00} },
{"Gateway ", "LT31 ", "v1.3201 ", 0x55, 0x58,
{0x10, 0x0f, 0x00} },
{"Gateway ", "LT31 ", "v1.3302 ", 0x55, 0x58,
{0x10, 0x0f, 0x00} },
{"Gateway", "LT31", "v1.3103", 0x55, 0x58, {0x10, 0x0f, 0x00} },
{"Gateway", "LT31", "v1.3201", 0x55, 0x58, {0x10, 0x0f, 0x00} },
{"Gateway", "LT31", "v1.3302", 0x55, 0x58, {0x10, 0x0f, 0x00} },
/* Packard Bell */
{"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x21, 0x00} },
{"Packard Bell", "DOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} },
{"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x21, 0x00} },
{"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x20, 0x00} },
{"Packard Bell", "DOTMU", "v1.3303", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
{"Packard Bell", "DOTMU", "v0.3120", 0x55, 0x58, {0x9e, 0x9e, 0x00} },
/* pewpew-terminator */
{"", "", "", 0, 0, {0, 0, 0} }
};
......@@ -486,13 +492,26 @@ static struct platform_driver acerhdf_driver = {
.remove = acerhdf_remove,
};
/* checks if str begins with start */
static int str_starts_with(const char *str, const char *start)
{
unsigned long str_len = 0, start_len = 0;
str_len = strlen(str);
start_len = strlen(start);
if (str_len >= start_len &&
!strncmp(str, start, start_len))
return 1;
return 0;
}
/* check hardware */
static int acerhdf_check_hardware(void)
{
char const *vendor, *version, *product;
int i;
unsigned long prod_len = 0;
const struct bios_settings_t *bt = NULL;
/* get BIOS data */
vendor = dmi_get_system_info(DMI_SYS_VENDOR);
......@@ -514,20 +533,20 @@ static int acerhdf_check_hardware(void)
kernelmode = 0;
}
prod_len = strlen(product);
if (verbose)
pr_info("BIOS info: %s %s, product: %s\n",
vendor, version, product);
/* search BIOS version and vendor in BIOS settings table */
for (i = 0; bios_tbl[i].version[0]; i++) {
if (strlen(bios_tbl[i].product) >= prod_len &&
!strncmp(bios_tbl[i].product, product,
strlen(bios_tbl[i].product)) &&
!strcmp(bios_tbl[i].vendor, vendor) &&
!strcmp(bios_tbl[i].version, version)) {
bios_cfg = &bios_tbl[i];
for (bt = bios_tbl; bt->vendor[0]; bt++) {
/*
* check if actual hardware BIOS vendor, product and version
* IDs start with the strings of BIOS table entry
*/
if (str_starts_with(vendor, bt->vendor) &&
str_starts_with(product, bt->product) &&
str_starts_with(version, bt->version)) {
bios_cfg = bt;
break;
}
}
......@@ -640,9 +659,14 @@ static void __exit acerhdf_exit(void)
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Peter Feuerer");
MODULE_DESCRIPTION("Aspire One temperature and fan driver");
MODULE_ALIAS("dmi:*:*Acer*:*:");
MODULE_ALIAS("dmi:*:*Gateway*:*:");
MODULE_ALIAS("dmi:*:*Packard Bell*:*:");
MODULE_ALIAS("dmi:*:*Acer*:pnAOA*:");
MODULE_ALIAS("dmi:*:*Acer*:pnAspire 1410*:");
MODULE_ALIAS("dmi:*:*Acer*:pnAspire 1810*:");
MODULE_ALIAS("dmi:*:*Gateway*:pnAOA*:");
MODULE_ALIAS("dmi:*:*Gateway*:pnLT31*:");
MODULE_ALIAS("dmi:*:*Packard Bell*:pnAOA*:");
MODULE_ALIAS("dmi:*:*Packard Bell*:pnDOA*:");
MODULE_ALIAS("dmi:*:*Packard Bell*:pnDOTMU*:");
module_init(acerhdf_init);
module_exit(acerhdf_exit);
This diff is collapsed.
......@@ -238,6 +238,7 @@ static void dell_wmi_notify(u32 value, void *context)
input_sync(dell_wmi_input_dev);
}
}
kfree(obj);
}
......@@ -324,37 +325,34 @@ static int __init dell_wmi_init(void)
int err;
if (wmi_has_guid(DELL_EVENT_GUID)) {
printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n");
return -ENODEV;
}
dmi_walk(find_hk_type, NULL);
err = dell_wmi_input_setup();
if (err)
return err;
err = wmi_install_notify_handler(DELL_EVENT_GUID,
dell_wmi_notify, NULL);
if (err) {
input_unregister_device(dell_wmi_input_dev);
printk(KERN_ERR "dell-wmi: Unable to register"
" notify handler - %d\n", err);
return err;
}
dmi_walk(find_hk_type, NULL);
acpi_video = acpi_video_backlight_support();
acpi_video = acpi_video_backlight_support();
err = dell_wmi_input_setup();
if (err)
return err;
} else
printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n");
err = wmi_install_notify_handler(DELL_EVENT_GUID,
dell_wmi_notify, NULL);
if (err) {
input_unregister_device(dell_wmi_input_dev);
printk(KERN_ERR
"dell-wmi: Unable to register notify handler - %d\n",
err);
return err;
}
return 0;
}
static void __exit dell_wmi_exit(void)
{
if (wmi_has_guid(DELL_EVENT_GUID)) {
wmi_remove_notify_handler(DELL_EVENT_GUID);
input_unregister_device(dell_wmi_input_dev);
}
wmi_remove_notify_handler(DELL_EVENT_GUID);
input_unregister_device(dell_wmi_input_dev);
}
module_init(dell_wmi_init);
......
......@@ -376,8 +376,8 @@ static int get_lcd_level(void)
status =
acpi_evaluate_integer(fujitsu->acpi_handle, "GBLL", NULL, &state);
if (status < 0)
return status;
if (ACPI_FAILURE(status))
return 0;
fujitsu->brightness_level = state & 0x0fffffff;
......@@ -398,8 +398,8 @@ static int get_max_brightness(void)
status =
acpi_evaluate_integer(fujitsu->acpi_handle, "RBLL", NULL, &state);
if (status < 0)
return status;
if (ACPI_FAILURE(status))
return -1;
fujitsu->max_brightness = state;
......
......@@ -134,10 +134,15 @@ static int hp_wmi_perform_query(int query, int write, int value)
obj = output.pointer;
if (!obj || obj->type != ACPI_TYPE_BUFFER)
if (!obj)
return -EINVAL;
else if (obj->type != ACPI_TYPE_BUFFER) {
kfree(obj);
return -EINVAL;
}
bios_return = *((struct bios_return *)obj->buffer.pointer);
kfree(obj);
if (bios_return.return_code > 0)
return bios_return.return_code * -1;
else
......@@ -340,10 +345,12 @@ static void hp_wmi_notify(u32 value, void *context)
if (!obj || obj->type != ACPI_TYPE_BUFFER || obj->buffer.length != 8) {
printk(KERN_INFO "HP WMI: Unknown response received\n");
kfree(obj);
return;
}
eventcode = *((u8 *) obj->buffer.pointer);
kfree(obj);
if (eventcode == 0x4)
eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0,
0);
......@@ -381,6 +388,8 @@ static void hp_wmi_notify(u32 value, void *context)
} else
printk(KERN_INFO "HP WMI: Unknown key pressed - %x\n",
eventcode);
kfree(obj);
}
static int __init hp_wmi_input_setup(void)
......
......@@ -34,16 +34,6 @@ MODULE_LICENSE("GPL");
MODULE_ALIAS("wmi:551A1F84-FBDD-4125-91DB-3EA8F44F1D45");
MODULE_ALIAS("wmi:B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2");
/* Temporary workaround until the WMI sysfs interface goes in
{ "svn", DMI_SYS_VENDOR },
{ "pn", DMI_PRODUCT_NAME },
{ "pvr", DMI_PRODUCT_VERSION },
{ "rvn", DMI_BOARD_VENDOR },
{ "rn", DMI_BOARD_NAME },
*/
MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-6638:*");
#define DRV_NAME "msi-wmi"
#define DRV_PFX DRV_NAME ": "
......
This diff is collapsed.
......@@ -540,8 +540,8 @@ EXPORT_SYMBOL_GPL(wmi_remove_notify_handler);
/**
* wmi_get_event_data - Get WMI data associated with an event
*
* @event - Event to find
* &out - Buffer to hold event data
* @event: Event to find
* @out: Buffer to hold event data. out->pointer should be freed with kfree()
*
* Returns extra data associated with an event in WMI.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment