tsync: tsync change the apts set code [1/2]
authorlive.li <live.li@amlogic.com>
Wed, 14 Nov 2018 02:15:00 +0000 (10:15 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 14 Nov 2018 07:03:24 +0000 (00:03 -0700)
PD#SWPL-1774

Problem:
DD program has avysnc problem over one night play

Solution:
fix the apts set bug

Verify:
p321

Change-Id: I0f6a5b47d3e3171a3dd8fa9a0b721cd11ec20b9e
Signed-off-by: live.li <live.li@amlogic.com>
drivers/amlogic/media/frame_sync/tsync.c

index cb2fc32d7cf072eaa66bc7d902c582f71a858471..6c7937938e455e137731da96923b3d14e2e9437a 100644 (file)
@@ -1441,7 +1441,7 @@ static ssize_t store_vpts(struct class *class,
        ssize_t r;
 
        /*r = sscanf(buf, "0x%x", &pts);*/
-       r = kstrtoint(buf, 0, &pts);
+       r = kstrtouint(buf, 0, &pts);
 
        if (r != 0)
                return -EINVAL;
@@ -1462,9 +1462,7 @@ static ssize_t store_apts(struct class *class,
 {
        unsigned int pts;
        ssize_t r;
-
-       /*r = sscanf(buf, "0x%x", &pts);*/
-       r = kstrtoint(buf, 0, &pts);
+       r = kstrtouint(buf, 0, &pts);
 
        if (r != 0)
                return -EINVAL;