Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39589
b: refs/heads/master
c: 4d6bd5e
h: refs/heads/master
i:
  39587: de0c96e
v: v3
  • Loading branch information
Stefan Schmidt authored and Len Brown committed Oct 14, 2006
1 parent 357b642 commit c6803a5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9443d7c93499e2b4bd37d30c09e8ac3aa4208466
refs/heads/master: 4d6bd5ea4ec4991901a8cf5a586babef68e1fa3f
67 changes: 30 additions & 37 deletions trunk/drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ struct asus_hotk {
S2x, //S200 (J1 reported), Victor MP-XP7210
W1N, //W1000N
W5A, //W5A
W3V, //W3030V
xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N
//(Centrino)
END_MODEL
Expand Down Expand Up @@ -377,17 +376,6 @@ static struct model_data model_conf[END_MODEL] = {
.display_get = "\\ADVG"},

{
.name = "W3V",
.mt_mled = "MLED",
.mt_wled = "WLED",
.mt_lcd_switch = xxN_PREFIX "_Q10",
.lcd_status = "\\BKLT",
.brightness_set = "SPLV",
.brightness_get = "GPLV",
.display_set = "SDSP",
.display_get = "\\INFB"},

{
.name = "xxN",
.mt_mled = "MLED",
/* WLED present, but not controlled by ACPI */
Expand Down Expand Up @@ -567,11 +555,11 @@ static int
write_led(const char __user * buffer, unsigned long count,
char *ledname, int ledmask, int invert)
{
int rv, value;
int value;
int led_out = 0;

rv = parse_arg(buffer, count, &value);
if (rv > 0)
count = parse_arg(buffer, count, &value);
if (count > 0)
led_out = value ? 1 : 0;

hotk->status =
Expand All @@ -584,7 +572,7 @@ write_led(const char __user * buffer, unsigned long count,
printk(KERN_WARNING "Asus ACPI: LED (%s) write failed\n",
ledname);

return rv;
return count;
}

/*
Expand Down Expand Up @@ -619,18 +607,20 @@ static int
proc_write_ledd(struct file *file, const char __user * buffer,
unsigned long count, void *data)
{
int rv, value;
int value;

rv = parse_arg(buffer, count, &value);
if (rv > 0) {
count = parse_arg(buffer, count, &value);
if (count > 0) {
if (!write_acpi_int
(hotk->handle, hotk->methods->mt_ledd, value, NULL))
printk(KERN_WARNING
"Asus ACPI: LED display write failed\n");
else
hotk->ledd_status = (u32) value;
}
return rv;
} else if (count < 0)
printk(KERN_WARNING "Asus ACPI: Error reading user input\n");

return count;
}

/*
Expand Down Expand Up @@ -771,12 +761,12 @@ static int
proc_write_lcd(struct file *file, const char __user * buffer,
unsigned long count, void *data)
{
int rv, value;
int value;

rv = parse_arg(buffer, count, &value);
if (rv > 0)
count = parse_arg(buffer, count, &value);
if (count > 0)
set_lcd_state(value);
return rv;
return count;
}

static int read_brightness(void)
Expand Down Expand Up @@ -840,15 +830,18 @@ static int
proc_write_brn(struct file *file, const char __user * buffer,
unsigned long count, void *data)
{
int rv, value;
int value;

rv = parse_arg(buffer, count, &value);
if (rv > 0) {
count = parse_arg(buffer, count, &value);
if (count > 0) {
value = (0 < value) ? ((15 < value) ? 15 : value) : 0;
/* 0 <= value <= 15 */
set_brightness(value);
} else if (count < 0) {
printk(KERN_WARNING "Asus ACPI: Error reading user input\n");
}
return rv;

return count;
}

static void set_display(int value)
Expand Down Expand Up @@ -887,12 +880,15 @@ static int
proc_write_disp(struct file *file, const char __user * buffer,
unsigned long count, void *data)
{
int rv, value;
int value;

rv = parse_arg(buffer, count, &value);
if (rv > 0)
count = parse_arg(buffer, count, &value);
if (count > 0)
set_display(value);
return rv;
else if (count < 0)
printk(KERN_WARNING "Asus ACPI: Error reading user input\n");

return count;
}

typedef int (proc_readfunc) (char *page, char **start, off_t off, int count,
Expand Down Expand Up @@ -1101,8 +1097,6 @@ static int asus_model_match(char *model)
return A4G;
else if (strncmp(model, "W1N", 3) == 0)
return W1N;
else if (strncmp(model, "W3V", 3) == 0)
return W3V;
else if (strncmp(model, "W5A", 3) == 0)
return W5A;
else
Expand Down Expand Up @@ -1206,10 +1200,9 @@ static int asus_hotk_get_info(void)
hotk->methods->mt_wled = NULL;
/* L5D's WLED is not controlled by ACPI */
else if (strncmp(string, "M2N", 3) == 0 ||
strncmp(string, "W3V", 3) == 0 ||
strncmp(string, "S1N", 3) == 0)
hotk->methods->mt_wled = "WLED";
/* M2N, S1N and W3V have a usable WLED */
/* M2N and S1N have a usable WLED */
else if (asus_info) {
if (strncmp(asus_info->oem_table_id, "L1", 2) == 0)
hotk->methods->mled_status = NULL;
Expand Down
13 changes: 7 additions & 6 deletions trunk/drivers/acpi/events/evrgnini.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,13 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
if (!
(ACPI_STRNCMP
(object_hID.value, PCI_ROOT_HID_STRING,
sizeof(PCI_ROOT_HID_STRING)))
||
!(ACPI_STRNCMP
(object_hID.value,
PCI_EXPRESS_ROOT_HID_STRING,
sizeof(PCI_EXPRESS_ROOT_HID_STRING)))) {
sizeof(PCI_ROOT_HID_STRING))
||
!(ACPI_STRNCMP
(object_hID.value,
PCI_EXPRESS_ROOT_HID_STRING,
sizeof(PCI_EXPRESS_ROOT_HID_STRING)))))
{

/* Install a handler for this PCI root bridge */

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/acpi/ibm_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1702,13 +1702,11 @@ static struct ibm_struct ibms[] = {
.name = "brightness",
.read = brightness_read,
.write = brightness_write,
.experimental = 1,
},
{
.name = "volume",
.read = volume_read,
.write = volume_write,
.experimental = 1,
},
{
.name = "fan",
Expand Down

0 comments on commit c6803a5

Please sign in to comment.