Re: drivers/ide/au1xxx-ide.c: use resource_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "H Hartley Sweeten" <hartleys@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Nov 2009 13:15:32 -0500

> Use resource_size() for {request/release}_mem_region and ioremap.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>

Applied to ide-next-2.6, thanks.

>  
> -	ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1);
> +	ahwif->regbase = (u32)ioremap(res->start, resource_size(res));
>  	if (ahwif->regbase == 0) {
>  		ret = -ENOMEM;
>  		goto out;

That needs some fixing.  ioremap()'s return value is an
"__iomem" pointer, not an integer.  ->regbase's type should be
changed to something like "void __iomem *" etc.
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux