summaryrefslogtreecommitdiffstats
path: root/sound/mips/au1x00.c
diff options
context:
space:
mode:
authorBenoit Taine <benoit.taine@lip6.fr>2014-05-28 17:14:06 +0200
committerTakashi Iwai <tiwai@suse.de>2014-05-28 17:50:57 +0200
commit82285f254ca8bacb0c089f87516b9db2bc13d580 (patch)
tree206d4c9ec3966705bec473ca130860dbd0fce1b2 /sound/mips/au1x00.c
parenta58bdba749b36069ec372da9c9fd16017b6c0b47 (diff)
ALSA: au1x00: Use resource_size instead of computation
This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/resource_size.cocci Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/mips/au1x00.c')
-rw-r--r--sound/mips/au1x00.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
index d10ef767526..fbcaa5434fd 100644
--- a/sound/mips/au1x00.c
+++ b/sound/mips/au1x00.c
@@ -648,14 +648,14 @@ static int au1000_ac97_probe(struct platform_device *pdev)
goto out;
err = -EBUSY;
- au1000->ac97_res_port = request_mem_region(r->start,
- r->end - r->start + 1, pdev->name);
+ au1000->ac97_res_port = request_mem_region(r->start, resource_size(r),
+ pdev->name);
if (!au1000->ac97_res_port) {
snd_printk(KERN_ERR "ALSA AC97: can't grab AC97 port\n");
goto out;
}
- io = ioremap(r->start, r->end - r->start + 1);
+ io = ioremap(r->start, resource_size(r));
if (!io)
goto out;