Re: [PATCH] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()

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

 



Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> writes:

> Hello.
>
> Kevin Hilman wrote:
>
>>> Hello.
>>>
>>> Kevin Hilman wrote:
>>>
>>>     
>>>> Signed-off-by: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
>>>>         
>>>   Sorry, NAK.
>>>
>>>     
>>>> diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
>>>> index f38aac7..be9c904 100644
>>>> --- a/drivers/ide/palm_bk3710.c
>>>> +++ b/drivers/ide/palm_bk3710.c
>>>> @@ -380,7 +380,11 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
>>>>  		return -EBUSY;
>>>>  	}
>>>>  -	base = IO_ADDRESS(mem->start);
>>>> +	base = ioremap(mem->start, mem->end);
>>>> +	if (!base) {
>>>> +		printk(KERN_ERR "failed to map IO memory\n");
>>>> +		return -ENOMEM;
>>>>         
>>>   Leaks requested memory region.
>> Where would you suggest putting the iounmap?
>
>   You misunderstood -- you don't call release_mem_region() on the
> error path.

Ah, I see.  Good catch.  I also noticed ioremap() takes 'size' and not
'end' so that needs to be fixed too.  Will resend.

Kevin

>> Which brings up a bigger question, why isn't there a remove hook.  I
>> vaguely remember there being some problem way back in the 2.6.18 time
>> frame that wouldn't allow this driver to be removed.
>
>   The IDE drivers were generally undremovable back then.
>
>> Is that still a problem in newer kernels?
>>   
>
>   No, shouldn't be -- they've been made removable since.
>
>> Kevin
>
> MBR, Sergei
--
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