summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-09-11 23:35:08 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-10-21 17:34:09 +0300
commit7f90611693f08f6b29209bd8d704ee17cbe003a0 (patch)
treeca0d58bc30e14f70a5572445bac18fcfbef1e338 /drivers/virtio
parentbfec6c83077cd784fb049abbe2c5ff32629a7498 (diff)
downloadlinux-7f90611693f08f6b29209bd8d704ee17cbe003a0.tar.xz
virtio_input: Constify id_table
id_table is not modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20200911203509.26505-3-rikard.falkeborn@gmail.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
index 877b2ea3ed05..f1f6208edcf5 100644
--- a/drivers/virtio/virtio_input.c
+++ b/drivers/virtio/virtio_input.c
@@ -363,7 +363,7 @@ static int virtinput_restore(struct virtio_device *vdev)
static unsigned int features[] = {
/* none */
};
-static struct virtio_device_id id_table[] = {
+static const struct virtio_device_id id_table[] = {
{ VIRTIO_ID_INPUT, VIRTIO_DEV_ANY_ID },
{ 0 },
};