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 <yicheng.shen@amlogic.com>
This commit is contained in:
yicheng shen
2018-03-20 15:20:33 +08:00
committed by Jianxin Pan
parent c9ade82ed3
commit 30c5a2171b
2 changed files with 6 additions and 6 deletions

View File

@@ -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;

View File

@@ -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"