linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>
Cc: Magnus Damm <magnus.damm@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
	Yoshihiro Kaneko <ykaneko0929@gmail.com>,
	Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>,
	Koji Matsuoka <koji.matsuoka.xm@renesas.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-serial@vger.kernel.org, linux-sh@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH v3 09/33] serial: sh-sci: Make sci_regmap[] const
Date: Fri, 21 Aug 2015 20:02:33 +0200	[thread overview]
Message-ID: <1440180177-6924-10-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1440180177-6924-1-git-send-email-geert+renesas@glider.be>

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v3:
  - No changes,

v2:
  - New.
---
 drivers/tty/serial/sh-sci.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 1758039066515fb7..383f6df3815a1747 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -147,7 +147,7 @@ struct plat_sci_reg {
 /* Helper for invalidating specific entries of an inherited map. */
 #define sci_reg_invalid	{ .offset = 0, .size = 0 }
 
-static struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = {
+static const struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = {
 	[SCIx_PROBE_REGTYPE] = {
 		[0 ... SCIx_NR_REGS - 1] = sci_reg_invalid,
 	},
@@ -400,7 +400,7 @@ static struct plat_sci_reg sci_regmap[SCIx_NR_REGTYPES][SCIx_NR_REGS] = {
  */
 static unsigned int sci_serial_in(struct uart_port *p, int offset)
 {
-	struct plat_sci_reg *reg = sci_getreg(p, offset);
+	const struct plat_sci_reg *reg = sci_getreg(p, offset);
 
 	if (reg->size == 8)
 		return ioread8(p->membase + (reg->offset << p->regshift));
@@ -414,7 +414,7 @@ static unsigned int sci_serial_in(struct uart_port *p, int offset)
 
 static void sci_serial_out(struct uart_port *p, int offset, int value)
 {
-	struct plat_sci_reg *reg = sci_getreg(p, offset);
+	const struct plat_sci_reg *reg = sci_getreg(p, offset);
 
 	if (reg->size == 8)
 		iowrite8(value, p->membase + (reg->offset << p->regshift));
@@ -552,7 +552,7 @@ static void sci_poll_put_char(struct uart_port *port, unsigned char c)
 static void sci_init_pins(struct uart_port *port, unsigned int cflag)
 {
 	struct sci_port *s = to_sci_port(port);
-	struct plat_sci_reg *reg = sci_regmap[s->cfg->regtype] + SCSPTR;
+	const struct plat_sci_reg *reg = sci_regmap[s->cfg->regtype] + SCSPTR;
 
 	/*
 	 * Use port-specific handler if provided.
@@ -582,7 +582,7 @@ static void sci_init_pins(struct uart_port *port, unsigned int cflag)
 
 static int sci_txfill(struct uart_port *port)
 {
-	struct plat_sci_reg *reg;
+	const struct plat_sci_reg *reg;
 
 	reg = sci_getreg(port, SCTFDR);
 	if (reg->size)
@@ -602,7 +602,7 @@ static int sci_txroom(struct uart_port *port)
 
 static int sci_rxfill(struct uart_port *port)
 {
-	struct plat_sci_reg *reg;
+	const struct plat_sci_reg *reg;
 
 	reg = sci_getreg(port, SCRFDR);
 	if (reg->size)
@@ -883,7 +883,7 @@ static int sci_handle_fifo_overrun(struct uart_port *port)
 {
 	struct tty_port *tport = &port->state->port;
 	struct sci_port *s = to_sci_port(port);
-	struct plat_sci_reg *reg;
+	const struct plat_sci_reg *reg;
 	int copied = 0;
 	u16 status;
 
@@ -1250,7 +1250,7 @@ static unsigned int sci_tx_empty(struct uart_port *port)
 static void sci_set_mctrl(struct uart_port *port, unsigned int mctrl)
 {
 	if (mctrl & TIOCM_LOOP) {
-		struct plat_sci_reg *reg;
+		const struct plat_sci_reg *reg;
 
 		/*
 		 * Standard loopback mode for SCFCR ports.
@@ -1621,7 +1621,7 @@ static void sci_stop_rx(struct uart_port *port)
 static void sci_break_ctl(struct uart_port *port, int break_state)
 {
 	struct sci_port *s = to_sci_port(port);
-	struct plat_sci_reg *reg = sci_regmap[s->cfg->regtype] + SCSPTR;
+	const struct plat_sci_reg *reg = sci_regmap[s->cfg->regtype] + SCSPTR;
 	unsigned short scscr, scsptr;
 
 	/* check wheter the port has SCSPTR */
@@ -1910,7 +1910,7 @@ static void sci_baud_calc_hscif(unsigned int bps, unsigned long freq,
 
 static void sci_reset(struct uart_port *port)
 {
-	struct plat_sci_reg *reg;
+	const struct plat_sci_reg *reg;
 	unsigned int status;
 
 	do {
@@ -1928,7 +1928,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
 			    struct ktermios *old)
 {
 	struct sci_port *s = to_sci_port(port);
-	struct plat_sci_reg *reg;
+	const struct plat_sci_reg *reg;
 	unsigned int baud, smr_val = 0, max_baud, cks = 0;
 	int t = -1;
 	unsigned int srr = 15;
-- 
1.9.1


  parent reply	other threads:[~2015-08-21 18:02 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 18:02 [PATCH v3 00/33] serial: sh-sci: Miscellaneous and DMA Improvements Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 01/33] serial: sh-sci: Replace buggy big #ifdef by runtime logic Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 02/33] serial: sh-sci: Prevent compiler warnings on 64-bit Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 03/33] serial: sh-sci: Correct SCIF_ERROR_CLEAR for plain SCIF Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 04/33] serial: sh-sci: Use SCIF_DR instead of hardcoded literal 1 Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 05/33] serial: sh-sci: Use SCSMR_CKS instead of hardcoded literal 3 Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 06/33] serial: sh-sci: Drop path in reference to serial_core.c Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 07/33] serial: sh-sci: Improve readability of sampling rate configuration Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 08/33] serial: sh-sci: Make sci_irq_desc[] const Geert Uytterhoeven
2015-08-21 18:02 ` Geert Uytterhoeven [this message]
2015-08-21 18:02 ` [PATCH v3 10/33] serial: sh-sci: Remove useless memory allocation failure printks Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 11/33] serial: sh-sci: Remove bogus sci_handle_fifo_overrun() call on (H)SCIF Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 12/33] serial: sh-sci: Return IRQ_HANDLED when overrun if detected Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 13/33] serial: sh-sci: Improve DMA error messages Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 14/33] serial: sh-sci: Improve comments for DMA timeout calculation Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 15/33] serial: sh-sci: Handle DMA init failures inside sci_request_dma() Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 16/33] serial: sh-sci: Use correct device for DMA mapping with IOMMU Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 17/33] serial: sh-sci: Use min_t()/max_t() instead of casts Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 18/33] serial: sh-sci: Switch to dma_map_single() for DMA transmission Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 19/33] serial: sh-sci: Fix TX buffer mapping leak Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 20/33] serial: sh-sci: Use DMA submission helpers instead of open-coding Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 21/33] serial: sh-sci: Switch to generic DMA residue handling Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 22/33] serial: sh-sci: Stop acknowledging DMA transmit completions Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 23/33] serial: sh-sci: Simplify sci_submit_rx() error handling Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 24/33] serial: sh-sci: Do not resubmit DMA descriptors Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 25/33] serial: sh-sci: Fix exclusion of work_fn_rx and sci_dma_rx_complete Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 26/33] serial: sh-sci: Fix race condition between RX worker and cleanup Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 27/33] serial: sh-sci: Pass scatterlist to sci_dma_rx_push() Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 28/33] serial: sh-sci: Use tty_insert_flip_string() for DMA receive Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 29/33] serial: sh-sci: Use incrementing pointers instead of stack array Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 30/33] serial: sh-sci: Fix NULL pointer dereference if HIGHMEM is enabled Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 31/33] serial: sh-sci: Don't call sci_rx_interrupt() on error when using DMA Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 32/33] serial: sh-sci: Don't kick tx in sci_er_interrupt() " Geert Uytterhoeven
2015-08-21 18:02 ` [PATCH v3 33/33] serial: sh-sci: Don't call sci_dma_rx_push() if no data has arrived Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440180177-6924-10-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=g.liakhovetski@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=iwamatsu@nigauri.org \
    --cc=jslaby@suse.com \
    --cc=kazuya.mizuguchi.ks@renesas.com \
    --cc=koji.matsuoka.xm@renesas.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=wsa@the-dreams.de \
    --cc=ykaneko0929@gmail.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).