diff options
| -rw-r--r-- | ina260.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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){ |
