[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFo=-_35tYAFs5hjYRSkQmaJZBS_Jej51_AuMfKta-1hNw@mail.gmail.com>
Date: Fri, 31 Oct 2014 10:35:22 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Pramod Gurav <pramod.gurav.etc@...il.com>
Cc: Pramod Gurav <pramod.gurav@...rtplayin.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Chris Ball <chris@...ntf.net>,
linux-mmc <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH v2] mmc: davinci: Fix and simplify probe failure path
On 30 October 2014 12:45, Pramod Gurav <pramod.gurav.etc@...il.com> wrote:
> Thanks Ulf,
>
> On Thu, Oct 30, 2014 at 4:38 PM, Ulf Hansson <ulf.hansson@...aro.org> wrote:
>> On 30 October 2014 08:46, Pramod Gurav <pramod.gurav@...rtplayin.com> wrote:
>>> The sequence of resource release in probe failure path in this
>>> driver was wrong and needed fixes to cleanly unload the driver.
>>> This changes does the same by switching to managed resources and
>>> fixes return path to release resource in proper sequence.
>>>
>>> Cc: Chris Ball <chris@...ntf.net>
>>> Cc: Ulf Hansson <ulf.hansson@...aro.org>
>>> Cc: linux-mmc@...r.kernel.org
>>
>> Please remove these Ccs above from the commit message. It's not needed
>> when you anyway need to send the patches directly to these addresses.
> Will remove Cc.
>
>>
>>> Signed-off-by: Pramod Gurav <pramod.gurav@...rtplayin.com>
>>> ---
> ..
>
>>>
>>> host = mmc_priv(mmc);
>>> host->mmc = mmc; /* Important */
>>> @@ -1275,15 +1273,16 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
>>> host->txdma = r->start;
>>>
>>> host->mem_res = mem;
>>> - host->base = ioremap(mem->start, mem_size);
>>> - if (!host->base)
>>> - goto out;
>>> + host->base = devm_ioremap(&pdev->dev, mem->start, mem_size);
>>
>> I realized that you should use devm_ioremap_resource() instead. That
>> would simplify the code even more.
>>
> Yes, we could have used devm_ioremap_resource() but this driver stores
> the return from devm_request_mem_region() in host->mem_res and uses
> the same in the other part of drivers. Is there a way to work this
> around?
Isn't that the same value as "mem->start" ?
Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists