All of lore.kernel.org
 help / color / mirror / Atom feed
From: shubhrajyoti.datta@gmail.com
To: linux-serial@vger.kernel.org
Cc: gregkh@linuxfoundation.org, jacmet@sunsite.dk,
	Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>,
	Michal Simek <michal.simek@xilinx.com>
Subject: [PATCHv4 2/4] serial-uartlite: Use allocated structure instead of static ones
Date: Tue, 12 Nov 2019 16:11:09 +0530	[thread overview]
Message-ID: <1573555271-2579-2-git-send-email-shubhrajyoti.datta@gmail.com> (raw)
In-Reply-To: <1573555271-2579-1-git-send-email-shubhrajyoti.datta@gmail.com>

From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Remove the use of the static uartlite structure.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/tty/serial/uartlite.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 8b39b2b..4d431a2 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -670,7 +670,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
 #endif
 
 	/* Register the port */
-	rc = uart_add_one_port(&ulite_uart_driver, port);
+	rc = uart_add_one_port(pdata->ulite_uart_driver, port);
 	if (rc) {
 		dev_err(dev, "uart_add_one_port() failed; err=%i\n", rc);
 		port->mapbase = 0;
@@ -681,7 +681,7 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
 #ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
 	/* This is not port which is used for console that's why clean it up */
 	if (console_port == port &&
-	    !(ulite_uart_driver.cons->flags & CON_ENABLED))
+	    !(pdata->ulite_uart_driver->cons->flags & CON_ENABLED))
 		console_port = NULL;
 #endif
 
-- 
2.1.1


  reply	other threads:[~2019-11-12 10:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 10:41 [PATCHv4 1/4] serial-uartlite: Change logic how console_port is setup shubhrajyoti.datta
2019-11-12 10:41 ` shubhrajyoti.datta [this message]
2019-11-12 10:41 ` [PATCHv4 3/4] serial-uartlite: Remove ULITE_NR_PORTS macro shubhrajyoti.datta
2019-11-12 10:41 ` [PATCHv4 4/4] serial: uartlite: Fix compilation issue on !OF platforms shubhrajyoti.datta
2019-11-13 11:23   ` Greg KH

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=1573555271-2579-2-git-send-email-shubhrajyoti.datta@gmail.com \
    --to=shubhrajyoti.datta@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacmet@sunsite.dk \
    --cc=linux-serial@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=shubhrajyoti.datta@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.