summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-07-01 23:09:48 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-07-09 11:25:21 +0300
commita024d70ae29825b117f2c80c53345053f074cdc1 (patch)
tree74b5b1a0d7b2f302a0056e3be6ac188506ec1ed0 /drivers/char
parentb242973f0fae47563917c7bd2ac6bf2b72cdafe8 (diff)
downloadlinux-a024d70ae29825b117f2c80c53345053f074cdc1.tar.xz
hwrng: virtio - Constify id_table[]
id_table[] is not modified and an be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 1746 192 8 1946 79a drivers/char/hw_random/virtio-rng.o After: text data bss dec hex filename 1762 176 8 1946 79a drivers/char/hw_random/virtio-rng.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/virtio-rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index 79a6e47b5fbc..a90001e02bf7 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -195,7 +195,7 @@ static int virtrng_restore(struct virtio_device *vdev)
}
#endif
-static struct virtio_device_id id_table[] = {
+static const struct virtio_device_id id_table[] = {
{ VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
{ 0 },
};