From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS() Date: Thu, 29 Jan 2009 16:29:00 -0800 Message-ID: <87d4e5ljqr.fsf@deeprootsystems.com> References: <1233270357-604-1-git-send-email-khilman@deeprootsystems.com> <498240EB.3090907@ru.mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from rv-out-0506.google.com ([209.85.198.236]:54454 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760290AbZA3A3c (ORCPT ); Thu, 29 Jan 2009 19:29:32 -0500 Received: by rv-out-0506.google.com with SMTP id k40so185594rvb.1 for ; Thu, 29 Jan 2009 16:29:31 -0800 (PST) In-Reply-To: <498240EB.3090907@ru.mvista.com> (Sergei Shtylyov's message of "Fri\, 30 Jan 2009 02\:51\:07 +0300") Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Sergei Shtylyov Cc: linux-ide@vger.kernel.org, davinci-linux-open-source@linux.davincidsp.com Sergei Shtylyov writes: > Hello. > > Kevin Hilman wrote: > >> Signed-off-by: Kevin Hilman >> > > 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? If the driver had a remove hook, I would've put it there. 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. Is that still a problem in newer kernels? Kevin