Merge tag 'acpi-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-block.git] / drivers / platform / x86 / sony-laptop.c
index 765fcaba4d121ea09752b7554437788b1743b0b0..7156ae2ad1962a750ef95c424d6068b170f86661 100644 (file)
@@ -820,10 +820,9 @@ static ssize_t sony_nc_handles_show(struct device *dev,
        int i;
 
        for (i = 0; i < ARRAY_SIZE(handles->cap); i++) {
-               len += scnprintf(buffer + len, PAGE_SIZE - len, "0x%.4x ",
-                               handles->cap[i]);
+               len += sysfs_emit_at(buffer, len, "0x%.4x ", handles->cap[i]);
        }
-       len += scnprintf(buffer + len, PAGE_SIZE - len, "\n");
+       len += sysfs_emit_at(buffer, len, "\n");
 
        return len;
 }
@@ -2173,10 +2172,9 @@ static ssize_t sony_nc_thermal_profiles_show(struct device *dev,
 
        for (cnt = 0; cnt < THM_PROFILE_MAX; cnt++) {
                if (!cnt || (th_handle->profiles & cnt))
-                       idx += scnprintf(buffer + idx, PAGE_SIZE - idx, "%s ",
-                                       snc_thermal_profiles[cnt]);
+                       idx += sysfs_emit_at(buffer, idx, "%s ", snc_thermal_profiles[cnt]);
        }
-       idx += scnprintf(buffer + idx, PAGE_SIZE - idx, "\n");
+       idx += sysfs_emit_at(buffer, idx, "\n");
 
        return idx;
 }
@@ -3263,7 +3261,7 @@ outwalk:
        return result;
 }
 
-static int sony_nc_remove(struct acpi_device *device)
+static void sony_nc_remove(struct acpi_device *device)
 {
        struct sony_nc_value *item;
 
@@ -3280,8 +3278,6 @@ static int sony_nc_remove(struct acpi_device *device)
        sony_pf_remove();
        sony_laptop_remove_input();
        dprintk(SONY_NC_DRIVER_NAME " removed.\n");
-
-       return 0;
 }
 
 static const struct acpi_device_id sony_device_ids[] = {
@@ -4630,14 +4626,14 @@ found:
  *  ACPI driver
  *
  *****************/
-static int sony_pic_remove(struct acpi_device *device)
+static void sony_pic_remove(struct acpi_device *device)
 {
        struct sony_pic_ioport *io, *tmp_io;
        struct sony_pic_irq *irq, *tmp_irq;
 
        if (sony_pic_disable(device)) {
                pr_err("Couldn't disable device\n");
-               return -ENXIO;
+               return;
        }
 
        free_irq(spic_dev.cur_irq->irq.interrupts[0], &spic_dev);
@@ -4667,7 +4663,6 @@ static int sony_pic_remove(struct acpi_device *device)
        spic_dev.cur_irq = NULL;
 
        dprintk(SONY_PIC_DRIVER_NAME " removed.\n");
-       return 0;
 }
 
 static int sony_pic_add(struct acpi_device *device)