All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Venture <venture@google.com>
To: cminyard@mvista.com, wuhaotsh@google.com, hskinnemoen@google.com,
	 f4bug@amsat.org
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	 Patrick Venture <venture@google.com>
Subject: [PATCH v4 1/4] hw/i2c: name I2CNode list in I2CBus
Date: Mon, 12 Apr 2021 12:45:19 -0700	[thread overview]
Message-ID: <20210412194522.664594-2-venture@google.com> (raw)
In-Reply-To: <20210412194522.664594-1-venture@google.com>

To enable passing the current_devs field as a parameter, we need to use
a named struct type.

Tested: BMC firmware with i2c devices booted to userspace.

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 include/hw/i2c/i2c.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/hw/i2c/i2c.h b/include/hw/i2c/i2c.h
index 277dd9f2d6..1f7c268c86 100644
--- a/include/hw/i2c/i2c.h
+++ b/include/hw/i2c/i2c.h
@@ -58,9 +58,11 @@ struct I2CNode {
     QLIST_ENTRY(I2CNode) next;
 };
 
+typedef QLIST_HEAD(I2CNodeList, I2CNode) I2CNodeList;
+
 struct I2CBus {
     BusState qbus;
-    QLIST_HEAD(, I2CNode) current_devs;
+    I2CNodeList current_devs;
     uint8_t saved_address;
     bool broadcast;
 };
-- 
2.31.1.295.g9ea45b61b8-goog



  reply	other threads:[~2021-04-12 19:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 19:45 [PATCH v4 0/4] hw/i2c: Adds pca954x i2c mux switch device Patrick Venture
2021-04-12 19:45 ` Patrick Venture [this message]
2021-04-12 19:45 ` [PATCH v4 2/4] hw/i2c: add match method for device search Patrick Venture
2021-04-12 19:45 ` [PATCH v4 3/4] hw/i2c: move search to i2c_scan_bus method Patrick Venture
2021-04-12 19:45 ` [PATCH v4 4/4] hw/i2c: add pca954x i2c-mux switch Patrick Venture
2021-04-15 12:12 ` [PATCH v4 0/4] hw/i2c: Adds pca954x i2c mux switch device Corey Minyard
2021-04-15 17:14   ` Patrick Venture

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=20210412194522.664594-2-venture@google.com \
    --to=venture@google.com \
    --cc=cminyard@mvista.com \
    --cc=f4bug@amsat.org \
    --cc=hskinnemoen@google.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wuhaotsh@google.com \
    /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 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.