aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-09 12:13:32 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:55:36 -0400
commit28f65c11f2ffb3957259dece647a24f8ad2e241b (patch)
tree6b7621d09d10df89eedd908d4506fb9f457a909f /sound/ppc
parent140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff)
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 <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'sound/ppc')
-rw-r--r--sound/ppc/pmac.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 3ecbd67f88c9..ab96cde7417b 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -881,8 +881,7 @@ static int snd_pmac_free(struct snd_pmac *chip)
881 for (i = 0; i < 3; i++) { 881 for (i = 0; i < 3; i++) {
882 if (chip->requested & (1 << i)) 882 if (chip->requested & (1 << i))
883 release_mem_region(chip->rsrc[i].start, 883 release_mem_region(chip->rsrc[i].start,
884 chip->rsrc[i].end - 884 resource_size(&chip->rsrc[i]));
885 chip->rsrc[i].start + 1);
886 } 885 }
887 } 886 }
888 887
@@ -1228,8 +1227,7 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1228 goto __error; 1227 goto __error;
1229 } 1228 }
1230 if (request_mem_region(chip->rsrc[i].start, 1229 if (request_mem_region(chip->rsrc[i].start,
1231 chip->rsrc[i].end - 1230 resource_size(&chip->rsrc[i]),
1232 chip->rsrc[i].start + 1,
1233 rnames[i]) == NULL) { 1231 rnames[i]) == NULL) {
1234 printk(KERN_ERR "snd: can't request rsrc " 1232 printk(KERN_ERR "snd: can't request rsrc "
1235 " %d (%s: %pR)\n", 1233 " %d (%s: %pR)\n",
@@ -1254,8 +1252,7 @@ int __devinit snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1254 goto __error; 1252 goto __error;
1255 } 1253 }
1256 if (request_mem_region(chip->rsrc[i].start, 1254 if (request_mem_region(chip->rsrc[i].start,
1257 chip->rsrc[i].end - 1255 resource_size(&chip->rsrc[i]),
1258 chip->rsrc[i].start + 1,
1259 rnames[i]) == NULL) { 1256 rnames[i]) == NULL) {
1260 printk(KERN_ERR "snd: can't request rsrc " 1257 printk(KERN_ERR "snd: can't request rsrc "
1261 " %d (%s: %pR)\n", 1258 " %d (%s: %pR)\n",