From: sf Date: Tue, 27 Aug 2024 19:01:11 +0000 (+0000) Subject: constify struct virtio_ops X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8cd32577422b3501aeacf1e8f4c9aee38824e0a7;p=openbsd constify struct virtio_ops OK bluhm@ --- diff --git a/sys/dev/fdt/virtio_mmio.c b/sys/dev/fdt/virtio_mmio.c index 2ec1db919d7..212614f98ff 100644 --- a/sys/dev/fdt/virtio_mmio.c +++ b/sys/dev/fdt/virtio_mmio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio_mmio.c,v 1.15 2024/08/26 19:37:54 sf Exp $ */ +/* $OpenBSD: virtio_mmio.c,v 1.16 2024/08/27 19:01:11 sf Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -133,7 +133,7 @@ const struct cfattach virtio_mmio_fdt_ca = { NULL }; -struct virtio_ops virtio_mmio_ops = { +const struct virtio_ops virtio_mmio_ops = { virtio_mmio_kick, virtio_mmio_read_device_config_1, virtio_mmio_read_device_config_2, diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c index 9b8842b03c4..f7b2acda17b 100644 --- a/sys/dev/pci/virtio_pci.c +++ b/sys/dev/pci/virtio_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: virtio_pci.c,v 1.39 2024/08/26 19:37:54 sf Exp $ */ +/* $OpenBSD: virtio_pci.c,v 1.40 2024/08/27 19:01:11 sf Exp $ */ /* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */ /* @@ -151,7 +151,7 @@ const struct cfattach virtio_pci_ca = { NULL }; -struct virtio_ops virtio_pci_ops = { +const struct virtio_ops virtio_pci_ops = { virtio_pci_kick, virtio_pci_read_device_config_1, virtio_pci_read_device_config_2, diff --git a/sys/dev/pv/virtiovar.h b/sys/dev/pv/virtiovar.h index c32fa17b9c0..367e166f2bb 100644 --- a/sys/dev/pv/virtiovar.h +++ b/sys/dev/pv/virtiovar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: virtiovar.h,v 1.20 2024/08/27 18:44:12 sf Exp $ */ +/* $OpenBSD: virtiovar.h,v 1.21 2024/08/27 19:01:11 sf Exp $ */ /* $NetBSD: virtiovar.h,v 1.1 2011/10/30 12:12:21 hannken Exp $ */ /* @@ -167,7 +167,7 @@ struct virtio_ops { struct virtio_softc { struct device sc_dev; bus_dma_tag_t sc_dmat; /* set by transport */ - struct virtio_ops *sc_ops; /* set by transport */ + const struct virtio_ops *sc_ops; /* set by transport */ int sc_ipl; /* set by child */