summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-17 19:36:23 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2017-09-22 11:43:05 +0200
commit677c4f4c228c6fdc24919408f7f89709b2f7d67e (patch)
tree7e4246ebd82c6d47bcd7c25af9fb006ded15e1fb
parentcrypto: nx-842 - constify vio_device_id (diff)
downloadlinux-677c4f4c228c6fdc24919408f7f89709b2f7d67e.tar.xz
linux-677c4f4c228c6fdc24919408f7f89709b2f7d67e.zip
hwrng: pseries - constify vio_device_id
vio_device_id are not supposed to change at runtime. All functions working with vio_device_id provided by <asm/vio.h> work with const vio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/char/hw_random/pseries-rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/pseries-rng.c b/drivers/char/hw_random/pseries-rng.c
index d9f46b437cc2..4e2a3f635277 100644
--- a/drivers/char/hw_random/pseries-rng.c
+++ b/drivers/char/hw_random/pseries-rng.c
@@ -72,7 +72,7 @@ static int pseries_rng_remove(struct vio_dev *dev)
return 0;
}
-static struct vio_device_id pseries_rng_driver_ids[] = {
+static const struct vio_device_id pseries_rng_driver_ids[] = {
{ "ibm,random-v1", "ibm,random"},
{ "", "" }
};