From: Betty Dall Date: Sat, 30 Apr 2016 16:03:38 +0000 (-0600) Subject: ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO X-Git-Tag: v4.7-rc1~170^2^3~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c0244091e8aa98e7977bdddeab2bb864cff9d91;p=platform%2Fkernel%2Flinux-exynos.git ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO The error return from a sysfs show function is passed up through the call chain and visible as the return from the read system call. The show functions for the _STA and _SUN object currently return -ENODEV. This patch changes the return to -EIO. ENODEV makes less sense since the "device' exists or there wouldn't be a sysfs file. Signed-off-by: Betty Dall Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 49cc0cb..e556a3e 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -467,7 +467,7 @@ acpi_device_sun_show(struct device *dev, struct device_attribute *attr, status = acpi_evaluate_integer(acpi_dev->handle, "_SUN", NULL, &sun); if (ACPI_FAILURE(status)) - return -ENODEV; + return -EIO; return sprintf(buf, "%llu\n", sun); } @@ -496,7 +496,7 @@ static ssize_t status_show(struct device *dev, struct device_attribute *attr, status = acpi_evaluate_integer(acpi_dev->handle, "_STA", NULL, &sta); if (ACPI_FAILURE(status)) - return -ENODEV; + return -EIO; return sprintf(buf, "%llu\n", sta); }