From: Jie Deng <jie.deng@intel.com>
To: linux-i2c@vger.kernel.org,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Cc: wsa@kernel.org, jie.deng@intel.com, viresh.kumar@linaro.org,
sfr@canb.auug.org.au, conghui.chen@intel.com
Subject: [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set
Date: Thu, 19 Aug 2021 08:48:41 +0800 [thread overview]
Message-ID: <4309f869890e70810f2c40a8d60495240e318303.1629333590.git.jie.deng@intel.com> (raw)
Fix the compiler warning "drivers/i2c/busses/i2c-virtio.c:208:17:
warning: unused variable 'pdev' [-Wunused-variable]" when CONFIG_ACPI
is not set.
Fixes: 8fb12751ac78 ("i2c: virtio: add a virtio i2c frontend driver")
Signed-off-by: Jie Deng <jie.deng@intel.com>
---
drivers/i2c/busses/i2c-virtio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-virtio.c b/drivers/i2c/busses/i2c-virtio.c
index d3e60d9..964c601 100644
--- a/drivers/i2c/busses/i2c-virtio.c
+++ b/drivers/i2c/busses/i2c-virtio.c
@@ -205,7 +205,6 @@ static const struct i2c_adapter_quirks virtio_i2c_quirks = {
static int virtio_i2c_probe(struct virtio_device *vdev)
{
- struct device *pdev = vdev->dev.parent;
struct virtio_i2c *vi;
int ret;
@@ -234,7 +233,7 @@ static int virtio_i2c_probe(struct virtio_device *vdev)
* Setup ACPI node for controlled devices which will be probed through
* ACPI.
*/
- ACPI_COMPANION_SET(&vi->adap.dev, ACPI_COMPANION(pdev));
+ ACPI_COMPANION_SET(&vi->adap.dev, ACPI_COMPANION(vdev->dev.parent));
ret = i2c_add_adapter(&vi->adap);
if (ret)
--
2.7.4
next reply other threads:[~2021-08-19 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 0:48 Jie Deng [this message]
2021-08-19 3:06 ` [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set Stephen Rothwell
2021-08-19 3:49 ` Viresh Kumar
2021-08-19 17:24 ` Wolfram Sang
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=4309f869890e70810f2c40a8d60495240e318303.1629333590.git.jie.deng@intel.com \
--to=jie.deng@intel.com \
--cc=conghui.chen@intel.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=viresh.kumar@linaro.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=wsa@kernel.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;
as well as URLs for NNTP newsgroup(s).