mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
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>
This commit is contained in:
parent
b242973f0f
commit
a024d70ae2
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ static int virtrng_restore(struct virtio_device *vdev)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct virtio_device_id id_table[] = {
|
static const struct virtio_device_id id_table[] = {
|
||||||
{ VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
|
{ VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
|
||||||
{ 0 },
|
{ 0 },
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue