Skip to content

Commit 5f7fdb0

Browse files
spandruvadarafaeljw
authored andcommitted
thermal: intel: int340x: Add new line for UUID display
Prior to the commit "763bd29fd3d1 ("thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf()", there was a new line after each UUID string. With the newline removed, existing user space like "thermald" fails to compare each supported UUID as it is using getline() to read UUID and apply correct thermal table. To avoid breaking existing user space, add newline after each UUID string. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Fixes: 763bd29 ("thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf()") Cc: 6.3+ <stable@vger.kernel.org> # 6.3+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 44c026a commit 5f7fdb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static ssize_t available_uuids_show(struct device *dev,
131131

132132
for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; i++) {
133133
if (priv->uuid_bitmap & (1 << i))
134-
length += sysfs_emit_at(buf, length, int3400_thermal_uuids[i]);
134+
length += sysfs_emit_at(buf, length, "%s\n", int3400_thermal_uuids[i]);
135135
}
136136

137137
return length;
@@ -149,7 +149,7 @@ static ssize_t current_uuid_show(struct device *dev,
149149

150150
for (i = 0; i <= INT3400_THERMAL_CRITICAL; i++) {
151151
if (priv->os_uuid_mask & BIT(i))
152-
length += sysfs_emit_at(buf, length, int3400_thermal_uuids[i]);
152+
length += sysfs_emit_at(buf, length, "%s\n", int3400_thermal_uuids[i]);
153153
}
154154

155155
if (length)

0 commit comments

Comments
 (0)