All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set
@ 2021-08-19  0:48 ` Jie Deng
  0 siblings, 0 replies; 7+ messages in thread
From: Jie Deng @ 2021-08-19  0:48 UTC (permalink / raw)
  To: linux-i2c, virtualization, linux-kernel
  Cc: wsa, jie.deng, viresh.kumar, sfr, conghui.chen

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-19 17:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-19  0:48 [PATCH] i2c: virtio: Fix the compiler warning when CONFIG_ACPI is not set Jie Deng
2021-08-19  0:48 ` Jie Deng
2021-08-19  3:06 ` Stephen Rothwell
2021-08-19  3:06   ` Stephen Rothwell
2021-08-19  3:49 ` Viresh Kumar
2021-08-19  3:49   ` Viresh Kumar
2021-08-19 17:24 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.