From 30c5a2171b3f3b4b9a01cdacd77e02b6c35abcfc Mon Sep 17 00:00:00 2001 From: yicheng shen Date: Tue, 20 Mar 2018 15:20:33 +0800 Subject: [PATCH] cec: change the return code of str to uint PD#161284: cec: change the return code of str to uint Change-Id: I88ac2b84574572f5a9ab82f111fdfe2e0ac60bc1 Signed-off-by: yicheng shen --- drivers/amlogic/cec/hdmi_ao_cec.c | 10 +++++----- drivers/amlogic/cec/hdmi_ao_cec.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index baad0cf..c9ee1334 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -1650,7 +1650,7 @@ static ssize_t device_type_store(struct class *cla, { unsigned int type; - if (kstrtouint(buf, 10, &type) != 1) + if (kstrtouint(buf, 10, &type) != 0) return -EINVAL; cec_dev->dev_type = type; @@ -1693,7 +1693,7 @@ static ssize_t vendor_id_store(struct class *cla, struct class_attribute *attr, { unsigned int id; - if (kstrtouint(buf, 16, &id) != 1) + if (kstrtouint(buf, 16, &id) != 0) return -EINVAL; cec_dev->cec_info.vendor_id = id; return count; @@ -1775,7 +1775,7 @@ static ssize_t port_seq_store(struct class *cla, { unsigned int seq; - if (kstrtouint(buf, 16, &seq) != 1) + if (kstrtouint(buf, 16, &seq) != 0) return -EINVAL; CEC_ERR("port_seq:%x\n", seq); @@ -1848,7 +1848,7 @@ static ssize_t physical_addr_store(struct class *cla, { int addr; - if (kstrtouint(buf, 16, &addr) != 1) + if (kstrtouint(buf, 16, &addr) != 0) return -EINVAL; if (addr > 0xffff || addr < 0) { CEC_ERR("invalid input:%s\n", buf); @@ -1871,7 +1871,7 @@ static ssize_t dbg_en_store(struct class *cla, struct class_attribute *attr, { int en; - if (kstrtouint(buf, 16, &en) != 1) + if (kstrtouint(buf, 16, &en) != 0) return -EINVAL; cec_msg_dbg_en = en ? 1 : 0; diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index 551b089..a6d8ebf 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -18,7 +18,7 @@ #ifndef __AO_CEC_H__ #define __AO_CEC_H__ -#define CEC_DRIVER_VERSION "2018/02/22\n" +#define CEC_DRIVER_VERSION "2018/03/09\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec" -- 2.7.4