aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2013-02-10 00:27:38 -0500
committerRusty Russell <rusty@rustcorp.com.au>2013-02-11 00:02:17 -0500
commit9350393239153c4a98cbed4d69b9ed81e37d5e74 (patch)
tree180ddb2f2968721c52ed9b5917378aff00c7b7f6 /drivers/virtio
parent0d34cc2d6d904e2d0160e42734bccc1cb391cec0 (diff)
virtio: make config_ops const
It is just a table of function pointers, make it const for cleanliness and security reasons. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_mmio.c2
-rw-r--r--drivers/virtio/virtio_pci.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 833e6dbf38db..1ba0d6831015 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -423,7 +423,7 @@ static const char *vm_bus_name(struct virtio_device *vdev)
423 return vm_dev->pdev->name; 423 return vm_dev->pdev->name;
424} 424}
425 425
426static struct virtio_config_ops virtio_mmio_config_ops = { 426static const struct virtio_config_ops virtio_mmio_config_ops = {
427 .get = vm_get, 427 .get = vm_get,
428 .set = vm_set, 428 .set = vm_set,
429 .get_status = vm_get_status, 429 .get_status = vm_get_status,
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 0c142892c105..52c5ce6aec8d 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -652,7 +652,7 @@ static int vp_set_vq_affinity(struct virtqueue *vq, int cpu)
652 return 0; 652 return 0;
653} 653}
654 654
655static struct virtio_config_ops virtio_pci_config_ops = { 655static const struct virtio_config_ops virtio_pci_config_ops = {
656 .get = vp_get, 656 .get = vp_get,
657 .set = vp_set, 657 .set = vp_set,
658 .get_status = vp_get_status, 658 .get_status = vp_get_status,