linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: amba-pl011: constify vendor_data structures
@ 2017-08-11 11:47 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2017-08-11 11:47 UTC (permalink / raw)
  To: Russell King
  Cc: kernel-janitors, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
	linux-kernel, Bhumika Goyal

These vendor_data structures are only stored in the vendor field of
the uart_amba_port structure, as defined in the same file, and this
field is declared as const.  Thus the vendor_data structures can be
const too.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---

There are some other vendor_data structures in the same file, but
they are used in a different way.

 drivers/tty/serial/amba-pl011.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 1888d16..ba4e795 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -128,7 +128,7 @@ static unsigned int get_fifosize_arm(struct amba_device *dev)
 	.get_fifosize		= get_fifosize_arm,
 };
 
-static struct vendor_data vendor_sbsa = {
+static const struct vendor_data vendor_sbsa = {
 	.reg_offset		= pl011_std_offsets,
 	.fr_busy		= UART01x_FR_BUSY,
 	.fr_dsr			= UART01x_FR_DSR,
@@ -143,7 +143,7 @@ static unsigned int get_fifosize_arm(struct amba_device *dev)
 };
 
 #ifdef CONFIG_ACPI_SPCR_TABLE
-static struct vendor_data vendor_qdt_qdf2400_e44 = {
+static const struct vendor_data vendor_qdt_qdf2400_e44 = {
 	.reg_offset		= pl011_std_offsets,
 	.fr_busy		= UART011_FR_TXFE,
 	.fr_dsr			= UART01x_FR_DSR,


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-11 11:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-11 11:47 [PATCH] tty: amba-pl011: constify vendor_data structures Julia Lawall

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).