| .. | .. |
|---|
| 296 | 296 | return ret; |
|---|
| 297 | 297 | } |
|---|
| 298 | 298 | /* |
|---|
| 299 | | - * NOTE: some devices with two i2c busses have the bad habit to return 0 |
|---|
| 299 | + * NOTE: some devices with two i2c buses have the bad habit to return 0 |
|---|
| 300 | 300 | * bytes if we are on bus B AND there was no write attempt to the |
|---|
| 301 | 301 | * specified slave address before AND no device is present at the |
|---|
| 302 | 302 | * requested slave address. |
|---|
| .. | .. |
|---|
| 427 | 427 | return ret; |
|---|
| 428 | 428 | } |
|---|
| 429 | 429 | /* |
|---|
| 430 | | - * NOTE: some devices with two i2c busses have the bad habit to return 0 |
|---|
| 430 | + * NOTE: some devices with two i2c buses have the bad habit to return 0 |
|---|
| 431 | 431 | * bytes if we are on bus B AND there was no write attempt to the |
|---|
| 432 | 432 | * specified slave address before AND no device is present at the |
|---|
| 433 | 433 | * requested slave address. |
|---|
| .. | .. |
|---|
| 949 | 949 | unsigned char buf; |
|---|
| 950 | 950 | int i, rc; |
|---|
| 951 | 951 | |
|---|
| 952 | | - memset(i2c_devicelist, 0, ARRAY_SIZE(i2c_devicelist)); |
|---|
| 952 | + memset(i2c_devicelist, 0, sizeof(i2c_devicelist)); |
|---|
| 953 | 953 | |
|---|
| 954 | 954 | for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) { |
|---|
| 955 | 955 | dev->i2c_client[bus].addr = i; |
|---|
| .. | .. |
|---|
| 964 | 964 | |
|---|
| 965 | 965 | if (bus == dev->def_i2c_bus) |
|---|
| 966 | 966 | dev->i2c_hash = em28xx_hash_mem(i2c_devicelist, |
|---|
| 967 | | - ARRAY_SIZE(i2c_devicelist), 32); |
|---|
| 967 | + sizeof(i2c_devicelist), 32); |
|---|
| 968 | 968 | } |
|---|
| 969 | 969 | |
|---|
| 970 | 970 | /* |
|---|
| .. | .. |
|---|
| 985 | 985 | |
|---|
| 986 | 986 | dev->i2c_adap[bus] = em28xx_adap_template; |
|---|
| 987 | 987 | dev->i2c_adap[bus].dev.parent = &dev->intf->dev; |
|---|
| 988 | | - strcpy(dev->i2c_adap[bus].name, dev_name(&dev->intf->dev)); |
|---|
| 988 | + strscpy(dev->i2c_adap[bus].name, dev_name(&dev->intf->dev), |
|---|
| 989 | + sizeof(dev->i2c_adap[bus].name)); |
|---|
| 989 | 990 | |
|---|
| 990 | 991 | dev->i2c_bus[bus].bus = bus; |
|---|
| 991 | 992 | dev->i2c_bus[bus].algo_type = algo_type; |
|---|