Merge branch 'misc' into release
This commit is contained in:
@@ -230,7 +230,7 @@ config HP_WMI
|
||||
config MSI_LAPTOP
|
||||
tristate "MSI Laptop Extras"
|
||||
depends on X86
|
||||
depends on ACPI_EC
|
||||
depends on ACPI
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
---help---
|
||||
This is a driver for laptops built by MSI (MICRO-STAR
|
||||
@@ -260,7 +260,7 @@ config PANASONIC_LAPTOP
|
||||
config COMPAL_LAPTOP
|
||||
tristate "Compal Laptop Extras"
|
||||
depends on X86
|
||||
depends on ACPI_EC
|
||||
depends on ACPI
|
||||
depends on BACKLIGHT_CLASS_DEVICE
|
||||
---help---
|
||||
This is a driver for laptops built by Compal:
|
||||
|
@@ -464,6 +464,14 @@ static int dmi_check_cb_s6410(const struct dmi_system_id *id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dmi_check_cb_s6420(const struct dmi_system_id *id)
|
||||
{
|
||||
dmi_check_cb_common(id);
|
||||
fujitsu->keycode1 = KEY_SCREENLOCK; /* "Lock" */
|
||||
fujitsu->keycode2 = KEY_HELP; /* "Mobility Center" */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dmi_check_cb_p8010(const struct dmi_system_id *id)
|
||||
{
|
||||
dmi_check_cb_common(id);
|
||||
@@ -473,7 +481,7 @@ static int dmi_check_cb_p8010(const struct dmi_system_id *id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct dmi_system_id __initdata fujitsu_dmi_table[] = {
|
||||
static struct dmi_system_id fujitsu_dmi_table[] = {
|
||||
{
|
||||
.ident = "Fujitsu Siemens S6410",
|
||||
.matches = {
|
||||
@@ -481,6 +489,13 @@ static struct dmi_system_id __initdata fujitsu_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6410"),
|
||||
},
|
||||
.callback = dmi_check_cb_s6410},
|
||||
{
|
||||
.ident = "Fujitsu Siemens S6420",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S6420"),
|
||||
},
|
||||
.callback = dmi_check_cb_s6420},
|
||||
{
|
||||
.ident = "Fujitsu LifeBook P8010",
|
||||
.matches = {
|
||||
|
@@ -52,6 +52,11 @@ MODULE_LICENSE("GPL");
|
||||
#define MEMORY_ARG_CUR_BANDWIDTH 1
|
||||
#define MEMORY_ARG_MAX_BANDWIDTH 0
|
||||
|
||||
/*
|
||||
* GTHS returning 'n' would mean that [0,n-1] states are supported
|
||||
* In that case max_cstate would be n-1
|
||||
* GTHS returning '0' would mean that no bandwidth control states are supported
|
||||
*/
|
||||
static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
|
||||
unsigned long *max_state)
|
||||
{
|
||||
@@ -71,6 +76,9 @@ static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev,
|
||||
if (ACPI_FAILURE(status))
|
||||
return -EFAULT;
|
||||
|
||||
if (!value)
|
||||
return -EINVAL;
|
||||
|
||||
*max_state = value - 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -121,7 +129,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,
|
||||
if (memory_get_int_max_bandwidth(cdev, &max_state))
|
||||
return -EFAULT;
|
||||
|
||||
if (max_state < 0 || state > max_state)
|
||||
if (state > max_state)
|
||||
return -EINVAL;
|
||||
|
||||
arg_list.count = 1;
|
||||
|
Reference in New Issue
Block a user