From: Sreedevi Joshi <sreedevi.jo...@intel.com>

kstrtoint was being used to parse user input and set
trng_test_mode driver parameter. The base was set to
1 earlier. This is causing issues. Base passed is now
changed to 0 - to autodetect which will help in
addressing all bases correctly.

Signed-off-by: Sreedevi Joshi <sreedevi.jo...@intel.com>
---
 drivers/char/hw_random/axxia-rng.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/char/hw_random/axxia-rng.c 
b/drivers/char/hw_random/axxia-rng.c
index 15121fd..7790493 100644
--- a/drivers/char/hw_random/axxia-rng.c
+++ b/drivers/char/hw_random/axxia-rng.c
@@ -431,11 +431,10 @@ static ssize_t trng_attr_testmode_store(struct 
device_driver *drv,
                                       const char *buf, size_t count)
 {
        try_module_get(THIS_MODULE);
-       if (kstrtoint(buf, 1, &trng_test_mode) < 0) {
+       if (kstrtoint(buf, 0, &trng_test_mode) < 0) {
                module_put(THIS_MODULE);
                return -EFAULT;
        }
-
        module_put(THIS_MODULE);
        return count;
 }
-- 
2.7.4

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to