From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-i2c@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
rjw@rjwysocki.net, Aaron Lu <aaron.lu@intel.com>,
Lv Zheng <lv.zheng@intel.com>, Mark Brown <broonie@kernel.org>,
Kevin Hilman <khilman@linaro.org>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI
Date: Tue, 1 Oct 2013 12:52:09 +0300 [thread overview]
Message-ID: <20131001095209.GX28875@intel.com> (raw)
In-Reply-To: <1380552228-23329-2-git-send-email-mika.westerberg@linux.intel.com>
On Mon, Sep 30, 2013 at 05:43:48PM +0300, Mika Westerberg wrote:
> +static void acpi_i2c_device_pm_get(struct i2c_client *client)
> +{
> + struct i2c_adapter *adap = client->adapter;
> +
> + /* Make sure the adapter is active */
> + if (ACPI_HANDLE(adap->dev.parent))
> + pm_runtime_get_sync(&adap->dev);
> + if (ACPI_HANDLE(&client->dev))
> + acpi_dev_pm_attach(&client->dev, true);
There's a bug here as we call acpi_dev_pm_attach() several times. It
doesn't do any harm because acpi_dev_pm_attach() checks if the device is
already attached to the ACPI domain or not.
I'll fix this in the next revision as well.
> +}
next prev parent reply other threads:[~2013-10-01 9:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 14:43 [PATCH v3] runtime PM support for I2C adapter devices Mika Westerberg
[not found] ` <1380552228-23329-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-09-30 14:43 ` [PATCH v3] i2c: enable runtime PM for I2C adapter devices enumerated from ACPI Mika Westerberg
2013-09-30 17:20 ` Rafael J. Wysocki
[not found] ` <34540715.4ajYlpge4D-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2013-09-30 17:23 ` Rafael J. Wysocki
2013-09-30 18:59 ` Mika Westerberg
2013-10-01 9:52 ` Mika Westerberg [this message]
[not found] ` <1380552228-23329-2-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-01 13:09 ` [PATCH v4] " Mika Westerberg
2013-10-01 16:24 ` Rafael J. Wysocki
[not found] ` <1380632982-10709-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-05 8:09 ` Mika Westerberg
[not found] ` <20131005080901.GQ28875-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-10-05 10:31 ` Mark Brown
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=20131001095209.GX28875@intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=aaron.lu@intel.com \
--cc=broonie@kernel.org \
--cc=khilman@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=rjw@rjwysocki.net \
--cc=s.nawrocki@samsung.com \
--cc=wsa@the-dreams.de \
/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;
as well as URLs for NNTP newsgroup(s).