mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Bluetooth: bt3c_cs: clean up obsolete functions
simple_strtoul is obsolete, use kstrtoul instead reported by checkpatch. Signed-off-by: Prasanna Karthik <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
This commit is contained in:
parent
8f9d02f470
commit
10bd9731cc
1 changed files with 8 additions and 4 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue