From 7f3507b606b0f5c0c44cc59eb27e87575cf87701 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Sat, 26 Oct 2024 02:58:42 -0600 Subject: conventions: Don't have 2 ways to spell "implements_foo" Stop defining "struct foo" as a synonym for "implements_foo". --- cmd/sbc_harness/hw/spi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd/sbc_harness/hw/spi.h') diff --git a/cmd/sbc_harness/hw/spi.h b/cmd/sbc_harness/hw/spi.h index 653e80f..da588de 100644 --- a/cmd/sbc_harness/hw/spi.h +++ b/cmd/sbc_harness/hw/spi.h @@ -22,7 +22,11 @@ struct bidi_iovec { size_t iov_len; }; -struct spi; +struct spi_vtable; + +typedef struct { + struct spi_vtable *vtable; +} implements_spi; /* This API assumes that an SPI frame is a multiple of 8-bits. * @@ -37,11 +41,7 @@ struct spi; * non-multiple-of-8 number of bits. */ struct spi_vtable { - void (*readwritev)(struct spi *, const struct bidi_iovec *iov, int iovcnt); + void (*readwritev)(implements_spi *, const struct bidi_iovec *iov, int iovcnt); }; -typedef struct spi { - struct spi_vtable *vtable; -} implements_spi; - #endif /* _HW_SPI_H_ */ -- cgit v1.2.3-2-g168b