All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shubhrajyoti <shubhrajyoti-l0cyMroinI0@public.gmane.org>
To: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Hebbar,
	Gururaja" <gururaja.hebbar-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH 2/3] OMAP: SPI: call pm_runtime_disable in error path and remove
Date: Mon, 31 Oct 2011 10:46:50 +0530	[thread overview]
Message-ID: <4EAE2F42.1010906@ti.com> (raw)
In-Reply-To: <20111029120655.GE22592-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>

On Saturday 29 October 2011 05:36 PM, Grant Likely wrote:
> On Fri, Oct 28, 2011 at 05:14:18PM +0530, Shubhrajyoti D wrote:
>> omap mcspi probe() doesnt call pm_runtime  disable functions
>> in case of failure. remove() doesnt call pm_runtime disable. This could
>> lead to warnings as below on subsequent insmod.
>>
>> ~# insmod spi-omap2-mcspi.ko
>> [  255.383671] omap2_mcspi omap2_mcspi.1: Unbalanced pm_runtime_enable!
>> ...
>>
>> This patch adds the pm_runtime disable() at appropriate stages.
>>
>> Signed-off-by: Hebbar, Gururaja<gururaja.hebbar-l0cyMroinI0@public.gmane.org>
>> Signed-off-by: Shubhrajyoti D<shubhrajyoti-l0cyMroinI0@public.gmane.org>
> Nitpick: please use the format "spi/<device>: ...." for the subject
> line of spi patches.  It's just a consistency thing that I like.
Henceforth I will take care
> Picked up for v3.3, thanks.
>
> g.
>
>> ---
>>   drivers/spi/spi-omap2-mcspi.c |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
>> index 471b0f3..6875a0b 100644
>> --- a/drivers/spi/spi-omap2-mcspi.c
>> +++ b/drivers/spi/spi-omap2-mcspi.c
>> @@ -1195,6 +1195,7 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
>>   err4:
>>   	spi_master_put(master);
>>   err3:
>> +	pm_runtime_disable(&pdev->dev);
>>   	kfree(mcspi->dma_channels);
>>   err2:
>>   	release_mem_region(r->start, resource_size(r));
>> @@ -1216,6 +1217,7 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev)
>>   	dma_channels = mcspi->dma_channels;
>>
>>   	omap2_mcspi_disable_clocks(mcspi);
>> +	pm_runtime_disable(&pdev->dev);
>>   	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>   	release_mem_region(r->start, resource_size(r));
>>
>> -- 
>> 1.7.1
>>
>>
>> ------------------------------------------------------------------------------
>> The demand for IT networking professionals continues to grow, and the
>> demand for specialized networking skills is growing even more rapidly.
>> Take a complimentary Learning@Cisco Self-Assessment and learn
>> about Cisco certifications, training, and career opportunities.
>> http://p.sf.net/sfu/cisco-dev2dev
>> _______________________________________________
>> spi-devel-general mailing list
>> spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>> https://lists.sourceforge.net/lists/listinfo/spi-devel-general


------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev

WARNING: multiple messages have this Message-ID (diff)
From: Shubhrajyoti <shubhrajyoti@ti.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: spi-devel-general@lists.sourceforge.net, "Hebbar,
	Gururaja" <gururaja.hebbar@ti.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] OMAP: SPI: call pm_runtime_disable in error path and remove
Date: Mon, 31 Oct 2011 10:46:50 +0530	[thread overview]
Message-ID: <4EAE2F42.1010906@ti.com> (raw)
In-Reply-To: <20111029120655.GE22592@ponder.secretlab.ca>

On Saturday 29 October 2011 05:36 PM, Grant Likely wrote:
> On Fri, Oct 28, 2011 at 05:14:18PM +0530, Shubhrajyoti D wrote:
>> omap mcspi probe() doesnt call pm_runtime  disable functions
>> in case of failure. remove() doesnt call pm_runtime disable. This could
>> lead to warnings as below on subsequent insmod.
>>
>> ~# insmod spi-omap2-mcspi.ko
>> [  255.383671] omap2_mcspi omap2_mcspi.1: Unbalanced pm_runtime_enable!
>> ...
>>
>> This patch adds the pm_runtime disable() at appropriate stages.
>>
>> Signed-off-by: Hebbar, Gururaja<gururaja.hebbar@ti.com>
>> Signed-off-by: Shubhrajyoti D<shubhrajyoti@ti.com>
> Nitpick: please use the format "spi/<device>: ...." for the subject
> line of spi patches.  It's just a consistency thing that I like.
Henceforth I will take care
> Picked up for v3.3, thanks.
>
> g.
>
>> ---
>>   drivers/spi/spi-omap2-mcspi.c |    2 ++
>>   1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
>> index 471b0f3..6875a0b 100644
>> --- a/drivers/spi/spi-omap2-mcspi.c
>> +++ b/drivers/spi/spi-omap2-mcspi.c
>> @@ -1195,6 +1195,7 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
>>   err4:
>>   	spi_master_put(master);
>>   err3:
>> +	pm_runtime_disable(&pdev->dev);
>>   	kfree(mcspi->dma_channels);
>>   err2:
>>   	release_mem_region(r->start, resource_size(r));
>> @@ -1216,6 +1217,7 @@ static int __exit omap2_mcspi_remove(struct platform_device *pdev)
>>   	dma_channels = mcspi->dma_channels;
>>
>>   	omap2_mcspi_disable_clocks(mcspi);
>> +	pm_runtime_disable(&pdev->dev);
>>   	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>   	release_mem_region(r->start, resource_size(r));
>>
>> -- 
>> 1.7.1
>>
>>
>> ------------------------------------------------------------------------------
>> The demand for IT networking professionals continues to grow, and the
>> demand for specialized networking skills is growing even more rapidly.
>> Take a complimentary Learning@Cisco Self-Assessment and learn
>> about Cisco certifications, training, and career opportunities.
>> http://p.sf.net/sfu/cisco-dev2dev
>> _______________________________________________
>> spi-devel-general mailing list
>> spi-devel-general@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/spi-devel-general


  parent reply	other threads:[~2011-10-31  5:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 11:44 [PATCH 0/3] OMAP: SPI: Driver updates Shubhrajyoti D
2011-10-28 11:44 ` Shubhrajyoti D
     [not found] ` <1319802259-16565-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2011-10-28 11:44   ` [PATCH 1/3] OMAP: SPI: Use a workqueue per omap2_mcspi controller Shubhrajyoti D
2011-10-28 11:44     ` Shubhrajyoti D
2011-10-29 12:03     ` Grant Likely
2011-10-28 11:44   ` [PATCH 2/3] OMAP: SPI: call pm_runtime_disable in error path and remove Shubhrajyoti D
2011-10-28 11:44     ` Shubhrajyoti D
2011-10-29 12:06     ` Grant Likely
     [not found]       ` <20111029120655.GE22592-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-10-31  5:16         ` Shubhrajyoti [this message]
2011-10-31  5:16           ` Shubhrajyoti
2011-10-28 11:44   ` [PATCH 3/3] OMAP: SPI: Correct the error path Shubhrajyoti D
2011-10-28 11:44     ` Shubhrajyoti D
     [not found]     ` <1319802259-16565-4-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2011-10-29 12:07       ` Grant Likely
2011-10-29 12:07         ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAE2F42.1010906@ti.com \
    --to=shubhrajyoti-l0cymroini0@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=gururaja.hebbar-l0cyMroinI0@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.