aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_console.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-01-17 22:44:57 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-02-03 01:39:49 -0500
commitb51130685817d8c1b56386f9957405b5be2cdfe0 (patch)
tree539572b81d26a5eff70e75ad6d1fffb2f443cfc0 /drivers/char/hvc_console.c
parent7b62922a071aea362e879252d7482e448bd63d9c (diff)
hvc_console: Make the ops pointer const.
This is nicer for modern R/O protection. And noone needs it non-const, so constify the callers as well. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Amit Shah <amit.shah@redhat.com> To: Christian Borntraeger <borntraeger@de.ibm.com> Cc: linuxppc-dev@ozlabs.org Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r--drivers/char/hvc_console.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 416d3423150d..d8dac5820f0e 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -125,7 +125,7 @@ static struct hvc_struct *hvc_get_by_index(int index)
125 * console interfaces but can still be used as a tty device. This has to be 125 * console interfaces but can still be used as a tty device. This has to be
126 * static because kmalloc will not work during early console init. 126 * static because kmalloc will not work during early console init.
127 */ 127 */
128static struct hv_ops *cons_ops[MAX_NR_HVC_CONSOLES]; 128static const struct hv_ops *cons_ops[MAX_NR_HVC_CONSOLES];
129static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] = 129static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
130 {[0 ... MAX_NR_HVC_CONSOLES - 1] = -1}; 130 {[0 ... MAX_NR_HVC_CONSOLES - 1] = -1};
131 131
@@ -247,7 +247,7 @@ static void destroy_hvc_struct(struct kref *kref)
247 * vty adapters do NOT get an hvc_instantiate() callback since they 247 * vty adapters do NOT get an hvc_instantiate() callback since they
248 * appear after early console init. 248 * appear after early console init.
249 */ 249 */
250int hvc_instantiate(uint32_t vtermno, int index, struct hv_ops *ops) 250int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
251{ 251{
252 struct hvc_struct *hp; 252 struct hvc_struct *hp;
253 253
@@ -749,7 +749,8 @@ static const struct tty_operations hvc_ops = {
749}; 749};
750 750
751struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data, 751struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
752 struct hv_ops *ops, int outbuf_size) 752 const struct hv_ops *ops,
753 int outbuf_size)
753{ 754{
754 struct hvc_struct *hp; 755 struct hvc_struct *hp;
755 int i; 756 int i;