Merge tag 'input-for-v6.8-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor...
[linux-2.6-block.git] / drivers / input / touchscreen / atmel_mxt_ts.c
index a2c4b3b87f9356602b15e4d5eaaed2cc47f453a6..542a31448c8f13249cddffa1b2c8f5f9fb9f0c02 100644 (file)
@@ -2818,8 +2818,8 @@ static ssize_t mxt_fw_version_show(struct device *dev,
 {
        struct mxt_data *data = dev_get_drvdata(dev);
        struct mxt_info *info = data->info;
-       return scnprintf(buf, PAGE_SIZE, "%u.%u.%02X\n",
-                        info->version >> 4, info->version & 0xf, info->build);
+       return sysfs_emit(buf, "%u.%u.%02X\n",
+                         info->version >> 4, info->version & 0xf, info->build);
 }
 
 /* Hardware Version is returned as FamilyID.VariantID */
@@ -2828,8 +2828,7 @@ static ssize_t mxt_hw_version_show(struct device *dev,
 {
        struct mxt_data *data = dev_get_drvdata(dev);
        struct mxt_info *info = data->info;
-       return scnprintf(buf, PAGE_SIZE, "%u.%u\n",
-                        info->family_id, info->variant_id);
+       return sysfs_emit(buf, "%u.%u\n", info->family_id, info->variant_id);
 }
 
 static ssize_t mxt_show_instance(char *buf, int count,
@@ -2839,19 +2838,18 @@ static ssize_t mxt_show_instance(char *buf, int count,
        int i;
 
        if (mxt_obj_instances(object) > 1)
-               count += scnprintf(buf + count, PAGE_SIZE - count,
-                                  "Instance %u\n", instance);
+               count += sysfs_emit_at(buf, count, "Instance %u\n", instance);
 
        for (i = 0; i < mxt_obj_size(object); i++)
-               count += scnprintf(buf + count, PAGE_SIZE - count,
-                               "\t[%2u]: %02x (%d)\n", i, val[i], val[i]);
-       count += scnprintf(buf + count, PAGE_SIZE - count, "\n");
+               count += sysfs_emit_at(buf, count, "\t[%2u]: %02x (%d)\n",
+                                      i, val[i], val[i]);
+       count += sysfs_emit_at(buf, count, "\n");
 
        return count;
 }
 
 static ssize_t mxt_object_show(struct device *dev,
-                                   struct device_attribute *attr, char *buf)
+                              struct device_attribute *attr, char *buf)
 {
        struct mxt_data *data = dev_get_drvdata(dev);
        struct mxt_object *object;
@@ -2872,8 +2870,7 @@ static ssize_t mxt_object_show(struct device *dev,
                if (!mxt_object_readable(object->type))
                        continue;
 
-               count += scnprintf(buf + count, PAGE_SIZE - count,
-                               "T%u:\n", object->type);
+               count += sysfs_emit_at(buf, count, "T%u:\n", object->type);
 
                for (j = 0; j < mxt_obj_instances(object); j++) {
                        u16 size = mxt_obj_size(object);