aboutsummaryrefslogtreecommitdiff
path: root/hw/bt/hci-csr.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/bt/hci-csr.c')
-rw-r--r--hw/bt/hci-csr.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/bt/hci-csr.c b/hw/bt/hci-csr.c
index fbb3109cc1..9c3fb3c8f9 100644
--- a/hw/bt/hci-csr.c
+++ b/hw/bt/hci-csr.c
@@ -462,12 +462,16 @@ qemu_irq *csrhci_pins_get(CharDriverState *chr)
CharDriverState *uart_hci_init(void)
{
+ static const CharDriver hci_driver = {
+ .kind = -1,
+ .chr_write = csrhci_write,
+ .chr_ioctl = csrhci_ioctl,
+ };
struct csrhci_s *s = (struct csrhci_s *)
g_malloc0(sizeof(struct csrhci_s));
s->chr.opaque = s;
- s->chr.chr_write = csrhci_write;
- s->chr.chr_ioctl = csrhci_ioctl;
+ s->chr.driver = &hci_driver;
s->hci = qemu_next_hci();
s->hci->opaque = s;