From: Kevin Hilman <khilman@deeprootsystems.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: AnilKumar Ch <anilkumar@ti.com>,
wg@grandegger.com, linux-can@vger.kernel.org,
linux-omap@vger.kernel.org, anantgole@ti.com, nsekhar@ti.com
Subject: Re: [PATCH] can: c_can: Move pm_runtime_enable/disable calls to common code
Date: Thu, 13 Sep 2012 14:35:00 -0700 [thread overview]
Message-ID: <87ehm5bo8r.fsf@deeprootsystems.com> (raw)
In-Reply-To: <5051EB5C.7000907@pengutronix.de> (Marc Kleine-Budde's message of "Thu, 13 Sep 2012 16:19:08 +0200")
Marc Kleine-Budde <mkl@pengutronix.de> writes:
> On 09/13/2012 04:14 PM, Kevin Hilman wrote:
>> AnilKumar Ch <anilkumar@ti.com> writes:
>>
>>> Move pm_runtime_enable/disable calls to c_can.c driver. Current
>>> implementation is such that platform driver is doing pm_runtime
>>> enable/disable and core driver is doing put_sync/get_sync.
>>>
>>> PM runtime calls should be invoked if there is a valid device
>>> pointer from platform driver so moving enable/disable calls
>>> to core driver.
>>>
>>> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
>>> ---
>>> Incorporated Kevin's comments on "can: c_can: Add runtime PM
>>> support to Bosch C_CAN/D_CAN controller" patch.
>>
>> This looks better, but in addition, you can get rid of the
>> runtime PM helper functions you added (the ones that check for
>> priv->device) and call the pm_runtime_get/put APIs directly.
>
> But priv->device might be NULL. AFAICS pm_runtime_get() is not safe to
> be called with a NULL pointer.
Yes, you're right. Guess there's not a clean way to get rid of those
helpers.
Sorry for the noise,
Kevin
prev parent reply other threads:[~2012-09-13 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 7:28 [PATCH] can: c_can: Move pm_runtime_enable/disable calls to common code AnilKumar Ch
2012-09-13 7:48 ` Marc Kleine-Budde
2012-09-13 8:25 ` AnilKumar, Chimata
2012-09-13 14:14 ` Kevin Hilman
2012-09-13 14:19 ` Marc Kleine-Budde
2012-09-13 21:35 ` Kevin Hilman [this message]
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=87ehm5bo8r.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=anantgole@ti.com \
--cc=anilkumar@ti.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=nsekhar@ti.com \
--cc=wg@grandegger.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox