From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Rabin Vincent <rabin-66gdRtMMWGc@public.gmane.org>
Cc: Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 08/13] i2c/i2c-nomadik: use pm_runtime API
Date: Wed, 11 May 2011 14:35:07 +0200 [thread overview]
Message-ID: <BANLkTi=bxZn4-ePopBXmNTpfX6dCeMstug@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinQn5dQWXM12zUqWp-u1gF0Y-6nEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011/5/11 Rabin Vincent <rabin-66gdRtMMWGc@public.gmane.org>:
> On Wed, May 11, 2011 at 03:49, Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org> wrote:
>> On Mon, May 09, 2011 at 11:37:57PM +0200, Linus Walleij wrote:
>>> + /*
>>> + * During system suspend, runtime suspend transitions are disabled.
>>> + * This check and direct call are here so that even if some driver
>>> + * performs i2c transactions in its suspend rountine, we would properly
>>> + * runtime suspend the i2c driver.
>>> + */
>>> + if (!pm_runtime_suspended(dev))
>>> + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend)
>>> + dev->bus->pm->runtime_suspend(dev);
>>> +
>>
>> surely there must be better way of calling this?
>
> This is not needed and can be removed.
>
>>
>>> + return 0;
>>> +}
>>
>>> +static int nmk_i2c_resume(struct device *dev)
>>> +{
>>> + if (!pm_runtime_suspended(dev))
>>> + if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume)
>>> + dev->bus->pm->runtime_resume(dev);
>>> +
>>> + return 0;
>>
>> ditto.
>
> This too.
Cool, I'll cut it out of this patch and rebase the patch set.
Yours,
Linus Walleij
prev parent reply other threads:[~2011-05-11 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-09 21:37 [PATCH 08/13] i2c/i2c-nomadik: use pm_runtime API Linus Walleij
[not found] ` <1304977077-31661-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2011-05-10 22:19 ` Ben Dooks
[not found] ` <20110510221948.GA634-RazCHl0VsYgkUSuvROHNpA@public.gmane.org>
2011-05-11 4:00 ` Rabin Vincent
[not found] ` <BANLkTinQn5dQWXM12zUqWp-u1gF0Y-6nEA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-11 12:35 ` Linus Walleij [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='BANLkTi=bxZn4-ePopBXmNTpfX6dCeMstug@mail.gmail.com' \
--to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rabin-66gdRtMMWGc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox