OpenCloudOS-Kernel/drivers/tty/serial/jsm
Julia Lawall 5d9b9530e3 tty: serial: jsm_tty: constify uart_ops structures
Check for uart_ops structures that are only stored in the ops field of a
uart_port structure.  This field is declared const, so uart_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct uart_ops i@p = { ... };

@ok@
identifier r.i;
struct uart_port e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct uart_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct uart_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-02 15:01:16 +02:00
..
Makefile drivers: serial: jsm: Add the Classic board implementation 2014-11-06 15:17:34 -08:00
jsm.h serial: jsm: Fix unnecessary space before function ptr arguments 2014-11-25 17:06:38 -08:00
jsm_cls.c serial: jsm: some off by one bugs 2015-03-26 23:00:36 +01:00
jsm_driver.c drivers: serial: jsm: Switch "jsm" to JSM_DRIVER_NAME 2015-12-13 19:59:48 -08:00
jsm_neo.c serial/jsm: Deinline neo_parse_isr, save 688 bytes 2015-12-13 19:59:48 -08:00
jsm_tty.c tty: serial: jsm_tty: constify uart_ops structures 2016-09-02 15:01:16 +02:00