summaryrefslogtreecommitdiff
path: root/ina260.c
diff options
context:
space:
mode:
Diffstat (limited to 'ina260.c')
-rw-r--r--ina260.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ina260.c b/ina260.c
index 1903e68..64f0b11 100644
--- a/ina260.c
+++ b/ina260.c
@@ -114,7 +114,7 @@ static ssize_t attr_store(struct kobject *_kobj,
struct client_data *cdata=container_of(_kobj,struct client_data,kobj);
int data;
unsigned char reg=INA260_REG_CONFIGURATION;
- if(kstrtoint(buf, 10,&data))
+ if(kstrtoint_from_user(buf, count, 10,&data))
return -EINVAL;
if (INA260_IS_ATTR(mask_enable)){
@@ -251,7 +251,7 @@ static ssize_t attr_field_store(struct kobject *_kobj,
int data=0, ret=count;
unsigned char reg=INA260_REG_CONFIGURATION;
// Extract user supplied value
- if(kstrtoint(buf, 10,&data))
+ if(kstrtoint_from_user(buf, count, 10,&data))
return -EINVAL;
// Store:
if(INA260_IS_ATTR(reset) && data!=0){