aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/sony-laptop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 89ff6d845f3..78e6389d2ca 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -973,7 +973,7 @@ static ssize_t sony_nc_sysfs_store(struct device *dev,
973 struct device_attribute *attr, 973 struct device_attribute *attr,
974 const char *buffer, size_t count) 974 const char *buffer, size_t count)
975{ 975{
976 unsigned long value = 0; 976 int value;
977 int ret = 0; 977 int ret = 0;
978 struct sony_nc_value *item = 978 struct sony_nc_value *item =
979 container_of(attr, struct sony_nc_value, devattr); 979 container_of(attr, struct sony_nc_value, devattr);
@@ -984,7 +984,7 @@ static ssize_t sony_nc_sysfs_store(struct device *dev,
984 if (count > 31) 984 if (count > 31)
985 return -EINVAL; 985 return -EINVAL;
986 986
987 if (kstrtoul(buffer, 10, &value)) 987 if (kstrtoint(buffer, 10, &value))
988 return -EINVAL; 988 return -EINVAL;
989 989
990 if (item->validate) 990 if (item->validate)
@@ -994,7 +994,7 @@ static ssize_t sony_nc_sysfs_store(struct device *dev,
994 return value; 994 return value;
995 995
996 ret = sony_nc_int_call(sony_nc_acpi_handle, *item->acpiset, 996 ret = sony_nc_int_call(sony_nc_acpi_handle, *item->acpiset,
997 (int *)&value, NULL); 997 &value, NULL);
998 if (ret < 0) 998 if (ret < 0)
999 return -EIO; 999 return -EIO;
1000 1000