* [PATCH] tty: hvc_vio: constify vio_device_id
@ 2017-08-17 13:34 Arvind Yadav
2017-08-17 13:34 ` [PATCH] tty: hvcs: " Arvind Yadav
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-17 13:34 UTC (permalink / raw)
To: gregkh, jslaby; +Cc: linux-kernel, linuxppc-dev
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>
---
drivers/tty/hvc/hvc_vio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c
index b05dc50..39002a1 100644
--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -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"},
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] tty: hvcs: constify vio_device_id
2017-08-17 13:34 [PATCH] tty: hvc_vio: constify vio_device_id Arvind Yadav
@ 2017-08-17 13:34 ` Arvind Yadav
0 siblings, 0 replies; 2+ messages in thread
From: Arvind Yadav @ 2017-08-17 13:34 UTC (permalink / raw)
To: gregkh, jslaby; +Cc: linux-kernel, linuxppc-dev
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>
---
drivers/tty/hvc/hvcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 79cc5be..7320190 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -675,7 +675,7 @@ static int khvcsd(void *unused)
return 0;
}
-static struct vio_device_id hvcs_driver_table[] = {
+static const struct vio_device_id hvcs_driver_table[] = {
{"serial-server", "hvterm2"},
{ "", "" }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-17 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 13:34 [PATCH] tty: hvc_vio: constify vio_device_id Arvind Yadav
2017-08-17 13:34 ` [PATCH] tty: hvcs: " Arvind Yadav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).