*
* 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 */
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;
break;
}
- if (write_acpi_int(handle, NULL, out, NULL))
+ if (write_acpi_int(handle, NULL, out))
pr_warning(" write failed %x\n", mask);
}
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;
}
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;
}
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;
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;
}
*/
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;
}
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;
}
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;
}
(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.