tpm: vtpm: constify vio_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 17 Aug 2017 17:34:21 +0000 (23:04 +0530)
committerJames Morris <james.l.morris@oracle.com>
Sun, 24 Sep 2017 04:48:56 +0000 (21:48 -0700)
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>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
drivers/char/tpm/tpm_ibmvtpm.c

index f01d083eced2fc056d6d74e4423a62f28470e302..d2ce46bd247199285eea6c1a028dca0d18a164dd 100644 (file)
@@ -32,7 +32,7 @@
 
 static const char tpm_ibmvtpm_driver_name[] = "tpm_ibmvtpm";
 
-static struct vio_device_id tpm_ibmvtpm_device_table[] = {
+static const struct vio_device_id tpm_ibmvtpm_device_table[] = {
        { "IBM,vtpm", "IBM,vtpm"},
        { "", "" }
 };