| .. | .. |
|---|
| 26 | 26 | int i, pos = 0; |
|---|
| 27 | 27 | |
|---|
| 28 | 28 | for (i = 0; i < sprom_size_words; i++) |
|---|
| 29 | | - pos += snprintf(buf + pos, buf_len - pos - 1, |
|---|
| 29 | + pos += scnprintf(buf + pos, buf_len - pos - 1, |
|---|
| 30 | 30 | "%04X", swab16(sprom[i]) & 0xFFFF); |
|---|
| 31 | | - pos += snprintf(buf + pos, buf_len - pos - 1, "\n"); |
|---|
| 31 | + pos += scnprintf(buf + pos, buf_len - pos - 1, "\n"); |
|---|
| 32 | 32 | |
|---|
| 33 | 33 | return pos + 1; |
|---|
| 34 | 34 | } |
|---|
| .. | .. |
|---|
| 78 | 78 | |
|---|
| 79 | 79 | /* Use interruptible locking, as the SPROM write might |
|---|
| 80 | 80 | * be holding the lock for several seconds. So allow userspace |
|---|
| 81 | | - * to cancel operation. */ |
|---|
| 81 | + * to cancel operation. |
|---|
| 82 | + */ |
|---|
| 82 | 83 | err = -ERESTARTSYS; |
|---|
| 83 | 84 | if (mutex_lock_interruptible(&bus->sprom_mutex)) |
|---|
| 84 | 85 | goto out_kfree; |
|---|
| .. | .. |
|---|
| 121 | 122 | |
|---|
| 122 | 123 | /* Use interruptible locking, as the SPROM write might |
|---|
| 123 | 124 | * be holding the lock for several seconds. So allow userspace |
|---|
| 124 | | - * to cancel operation. */ |
|---|
| 125 | + * to cancel operation. |
|---|
| 126 | + */ |
|---|
| 125 | 127 | err = -ERESTARTSYS; |
|---|
| 126 | 128 | if (mutex_lock_interruptible(&bus->sprom_mutex)) |
|---|
| 127 | 129 | goto out_kfree; |
|---|
| .. | .. |
|---|
| 184 | 186 | return get_fallback_sprom(bus, out); |
|---|
| 185 | 187 | } |
|---|
| 186 | 188 | |
|---|
| 187 | | -/* http://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */ |
|---|
| 189 | +/* https://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */ |
|---|
| 188 | 190 | bool ssb_is_sprom_available(struct ssb_bus *bus) |
|---|
| 189 | 191 | { |
|---|
| 190 | 192 | /* status register only exists on chipcomon rev >= 11 and we need check |
|---|
| 191 | | - for >= 31 only */ |
|---|
| 193 | + * for >= 31 only |
|---|
| 194 | + */ |
|---|
| 192 | 195 | /* this routine differs from specs as we do not access SPROM directly |
|---|
| 193 | | - on PCMCIA */ |
|---|
| 196 | + * on PCMCIA |
|---|
| 197 | + */ |
|---|
| 194 | 198 | if (bus->bustype == SSB_BUSTYPE_PCI && |
|---|
| 195 | 199 | bus->chipco.dev && /* can be unavailable! */ |
|---|
| 196 | 200 | bus->chipco.dev->id.revision >= 31) |
|---|