]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Bluetooth: bt3c_cs: clean up obsolete functions
authorPrasanna Karthik <mkarthi3@visteon.com>
Fri, 11 Sep 2015 15:02:36 +0000 (15:02 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 17 Sep 2015 11:20:07 +0000 (13:20 +0200)
simple_strtoul is obsolete, use kstrtoul instead reported by checkpatch.

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/bt3c_cs.c

index a00bb82eb7c6d8322f835c8ce5689eae784bc5f2..772a2770710c7b7728dc529e4671d8f792922ca0 100644 (file)
@@ -453,7 +453,8 @@ static int bt3c_load_firmware(struct bt3c_info *info,
 {
        char *ptr = (char *) firmware;
        char b[9];
-       unsigned int iobase, size, addr, fcs, tmp;
+       unsigned int iobase, tmp;
+       unsigned long size, addr, fcs;
        int i, err = 0;
 
        iobase = info->p_dev->resource[0]->start;
@@ -478,15 +479,18 @@ static int bt3c_load_firmware(struct bt3c_info *info,
 
                memset(b, 0, sizeof(b));
                memcpy(b, ptr + 2, 2);
-               size = simple_strtoul(b, NULL, 16);
+               if (kstrtoul(b, 16, &size) < 0)
+                       return -EINVAL;
 
                memset(b, 0, sizeof(b));
                memcpy(b, ptr + 4, 8);
-               addr = simple_strtoul(b, NULL, 16);
+               if (kstrtoul(b, 16, &addr) < 0)
+                       return -EINVAL;
 
                memset(b, 0, sizeof(b));
                memcpy(b, ptr + (size * 2) + 2, 2);
-               fcs = simple_strtoul(b, NULL, 16);
+               if (kstrtoul(b, 16, &fcs) < 0)
+                       return -EINVAL;
 
                memset(b, 0, sizeof(b));
                for (tmp = 0, i = 0; i < size; i++) {