mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
140a1ef2f9
commit
28f65c11f2
168 changed files with 308 additions and 333 deletions
|
|
@ -881,8 +881,7 @@ static int snd_pmac_free(struct snd_pmac *chip)
|
|||
for (i = 0; i < 3; i++) {
|
||||
if (chip->requested & (1 << i))
|
||||
release_mem_region(chip->rsrc[i].start,
|
||||
chip->rsrc[i].end -
|
||||
chip->rsrc[i].start + 1);
|
||||
resource_size(&chip->rsrc[i]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1228,8 +1227,7 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
|
|||
goto __error;
|
||||
}
|
||||
if (request_mem_region(chip->rsrc[i].start,
|
||||
chip->rsrc[i].end -
|
||||
chip->rsrc[i].start + 1,
|
||||
resource_size(&chip->rsrc[i]),
|
||||
rnames[i]) == NULL) {
|
||||
printk(KERN_ERR "snd: can't request rsrc "
|
||||
" %d (%s: %pR)\n",
|
||||
|
|
@ -1254,8 +1252,7 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
|
|||
goto __error;
|
||||
}
|
||||
if (request_mem_region(chip->rsrc[i].start,
|
||||
chip->rsrc[i].end -
|
||||
chip->rsrc[i].start + 1,
|
||||
resource_size(&chip->rsrc[i]),
|
||||
rnames[i]) == NULL) {
|
||||
printk(KERN_ERR "snd: can't request rsrc "
|
||||
" %d (%s: %pR)\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue