[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <4309f869890e70810f2c40a8d60495240e318303.1629333590.git.jie.deng@intel.com>
Date: Thu, 19 Aug 2021 08:48:41 +0800
From: Jie Deng <jie.deng@...el.com>
To: linux-i2c@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org
Cc: wsa@...nel.org, jie.deng@...el.com, viresh.kumar@...aro.org,
sfr@...b.auug.org.au, conghui.chen@...el.com
Subject: [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set
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@...el.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
Powered by blists - more mailing lists