Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185043
b: refs/heads/master
c: d8c6732
h: refs/heads/master
i:
  185041: 7e52dc8
  185039: 3228b86
v: v3
  • Loading branch information
Corentin Chary committed Feb 28, 2010
1 parent 308f4b3 commit 1d70e7a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 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: e5b50f6a2b00de266f03c2c7219b798648124ea5
refs/heads/master: d8c6732382a24d2ef23665207263a17f04e3d75a
27 changes: 16 additions & 11 deletions trunk/drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ static struct key_entry asus_keymap[] = {
*
* returns 0 if write is successful, -1 else.
*/
static int write_acpi_int(acpi_handle handle, const char *method, int val,
struct acpi_buffer *output)
static int write_acpi_int_ret(acpi_handle handle, const char *method, int val,
struct acpi_buffer *output)
{
struct acpi_object_list params; /* list of input parameters (an int) */
union acpi_object in_obj; /* the only param we use */
Expand All @@ -374,6 +374,11 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
return -1;
}

static int write_acpi_int(acpi_handle handle, const char *method, int val)
{
return write_acpi_int_ret(handle, method, val, NULL);
}

static int read_wireless_status(int mask)
{
unsigned long long status;
Expand Down Expand Up @@ -437,7 +442,7 @@ static void write_status(acpi_handle handle, int out, int mask)
break;
}

if (write_acpi_int(handle, NULL, out, NULL))
if (write_acpi_int(handle, NULL, out))
pr_warning(" write failed %x\n", mask);
}

Expand Down Expand Up @@ -496,7 +501,7 @@ static int set_kled_lvl(int kblv)
else
kblv = 0;

if (write_acpi_int(kled_set_handle, NULL, kblv, NULL)) {
if (write_acpi_int(kled_set_handle, NULL, kblv)) {
pr_warning("Keyboard LED display write failed\n");
return -EINVAL;
}
Expand Down Expand Up @@ -571,7 +576,7 @@ static int read_brightness(struct backlight_device *bd)

static int set_brightness(struct backlight_device *bd, int value)
{
if (write_acpi_int(brightness_set_handle, NULL, value, NULL)) {
if (write_acpi_int(brightness_set_handle, NULL, value)) {
pr_warning("Error changing brightness\n");
return -EIO;
}
Expand Down Expand Up @@ -710,7 +715,7 @@ static ssize_t store_ledd(struct device *dev, struct device_attribute *attr,

rv = parse_arg(buf, count, &value);
if (rv > 0) {
if (write_acpi_int(ledd_set_handle, NULL, value, NULL))
if (write_acpi_int(ledd_set_handle, NULL, value))
pr_warning("LED display write failed\n");
else
hotk->ledd_status = (u32) value;
Expand Down Expand Up @@ -755,7 +760,7 @@ static ssize_t store_bluetooth(struct device *dev,
static void set_display(int value)
{
/* no sanity check needed for now */
if (write_acpi_int(display_set_handle, NULL, value, NULL))
if (write_acpi_int(display_set_handle, NULL, value))
pr_warning("Error setting display\n");
return;
}
Expand Down Expand Up @@ -814,7 +819,7 @@ static ssize_t store_disp(struct device *dev, struct device_attribute *attr,
*/
static void set_light_sens_switch(int value)
{
if (write_acpi_int(ls_switch_handle, NULL, value, NULL))
if (write_acpi_int(ls_switch_handle, NULL, value))
pr_warning("Error setting light sensor switch\n");
hotk->light_switch = value;
}
Expand All @@ -839,7 +844,7 @@ static ssize_t store_lssw(struct device *dev, struct device_attribute *attr,

static void set_light_sens_level(int value)
{
if (write_acpi_int(ls_level_handle, NULL, value, NULL))
if (write_acpi_int(ls_level_handle, NULL, value))
pr_warning("Error setting light sensor level\n");
hotk->light_level = value;
}
Expand Down Expand Up @@ -1104,7 +1109,7 @@ static int asus_hotk_get_info(void)
pr_warning("Couldn't get the DSDT table header\n");

/* We have to write 0 on init this far for all ASUS models */
if (write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
if (write_acpi_int_ret(hotk->handle, "INIT", 0, &buffer)) {
pr_err("Hotkey initialization failed\n");
return -ENODEV;
}
Expand All @@ -1119,7 +1124,7 @@ static int asus_hotk_get_info(void)
(uint) bsts_result);

/* This too ... */
write_acpi_int(hotk->handle, "CWAP", wapf, NULL);
write_acpi_int(hotk->handle, "CWAP", wapf);

/*
* Try to match the object returned by INIT to the specific model.
Expand Down

0 comments on commit 1d70e7a

Please sign in to comment.