Skip to content

Commit 82285f2

Browse files
orktiwai
authored andcommitted
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>
1 parent a58bdba commit 82285f2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎sound/mips/au1x00.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,14 @@ static int au1000_ac97_probe(struct platform_device *pdev)
648648
goto out;
649649

650650
err = -EBUSY;
651-
au1000->ac97_res_port = request_mem_region(r->start,
652-
r->end - r->start + 1, pdev->name);
651+
au1000->ac97_res_port = request_mem_region(r->start, resource_size(r),
652+
pdev->name);
653653
if (!au1000->ac97_res_port) {
654654
snd_printk(KERN_ERR "ALSA AC97: can't grab AC97 port\n");
655655
goto out;
656656
}
657657

658-
io = ioremap(r->start, r->end - r->start + 1);
658+
io = ioremap(r->start, resource_size(r));
659659
if (!io)
660660
goto out;
661661

0 commit comments

Comments
 (0)