tty: hvc_vio: constify vio_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 17 Aug 2017 13:34:22 +0000 (19:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 18:51:22 +0000 (20:51 +0200)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_vio.c

index 78b003be7f670a1ba4d6e61142677fe594a6a345..653f99271865b5e920f5a350bb8cc54450ef07be 100644 (file)
@@ -53,7 +53,7 @@
 
 static const char hvc_driver_name[] = "hvc_console";
 
-static struct vio_device_id hvc_driver_table[] = {
+static const struct vio_device_id hvc_driver_table[] = {
        {"serial", "hvterm1"},
 #ifndef HVC_OLD_HVSI
        {"serial", "hvterm-protocol"},