Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39586
b: refs/heads/master
c: 6311f0d
h: refs/heads/master
v: v3
  • Loading branch information
Darren Jenkins authored and Len Brown committed Oct 14, 2006
1 parent 1b8c668 commit 165727f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 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: 288f3ad406460f03642a41bb945826891a7b866f
refs/heads/master: 6311f0dac006032b82e3556874a1e18b31e80de2
46 changes: 23 additions & 23 deletions trunk/drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,11 @@ static int
write_led(const char __user * buffer, unsigned long count,
char *ledname, int ledmask, int invert)
{
int value;
int rv, value;
int led_out = 0;

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

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

return count;
return rv;
}

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

count = parse_arg(buffer, count, &value);
if (count > 0) {
rv = parse_arg(buffer, count, &value);
if (rv > 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;
} else if (count < 0)
} else if (rv < 0)
printk(KERN_WARNING "Asus ACPI: Error reading user input\n");

return count;
return rv;
}

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

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

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

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

return count;
return rv;
}

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

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

return count;
return rv;
}

typedef int (proc_readfunc) (char *page, char **start, off_t off, int count,
Expand Down

0 comments on commit 165727f

Please sign in to comment.