aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/sb1250-duart.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c
index 1d9d7285172a..201253755011 100644
--- a/drivers/serial/sb1250-duart.c
+++ b/drivers/serial/sb1250-duart.c
@@ -25,6 +25,7 @@
25#define SUPPORT_SYSRQ 25#define SUPPORT_SYSRQ
26#endif 26#endif
27 27
28#include <linux/compiler.h>
28#include <linux/console.h> 29#include <linux/console.h>
29#include <linux/delay.h> 30#include <linux/delay.h>
30#include <linux/errno.h> 31#include <linux/errno.h>
@@ -103,8 +104,6 @@ struct sbd_duart {
103 104
104static struct sbd_duart sbd_duarts[DUART_MAX_CHIP]; 105static struct sbd_duart sbd_duarts[DUART_MAX_CHIP];
105 106
106#define __unused __attribute__((__unused__))
107
108 107
109/* 108/*
110 * Reading and writing SB1250 DUART registers. 109 * Reading and writing SB1250 DUART registers.
@@ -204,12 +203,12 @@ static int sbd_receive_drain(struct sbd_port *sport)
204 return loops; 203 return loops;
205} 204}
206 205
207static int __unused sbd_transmit_ready(struct sbd_port *sport) 206static int __maybe_unused sbd_transmit_ready(struct sbd_port *sport)
208{ 207{
209 return read_sbdchn(sport, R_DUART_STATUS) & M_DUART_TX_RDY; 208 return read_sbdchn(sport, R_DUART_STATUS) & M_DUART_TX_RDY;
210} 209}
211 210
212static int __unused sbd_transmit_drain(struct sbd_port *sport) 211static int __maybe_unused sbd_transmit_drain(struct sbd_port *sport)
213{ 212{
214 int loops = 10000; 213 int loops = 10000;
215 214
@@ -664,7 +663,7 @@ static void sbd_release_port(struct uart_port *uport)
664 663
665static int sbd_map_port(struct uart_port *uport) 664static int sbd_map_port(struct uart_port *uport)
666{ 665{
667 static const char *err = KERN_ERR "sbd: Cannot map MMIO\n"; 666 const char *err = KERN_ERR "sbd: Cannot map MMIO\n";
668 struct sbd_port *sport = to_sport(uport); 667 struct sbd_port *sport = to_sport(uport);
669 struct sbd_duart *duart = sport->duart; 668 struct sbd_duart *duart = sport->duart;
670 669
@@ -691,8 +690,7 @@ static int sbd_map_port(struct uart_port *uport)
691 690
692static int sbd_request_port(struct uart_port *uport) 691static int sbd_request_port(struct uart_port *uport)
693{ 692{
694 static const char *err = KERN_ERR 693 const char *err = KERN_ERR "sbd: Unable to reserve MMIO resource\n";
695 "sbd: Unable to reserve MMIO resource\n";
696 struct sbd_duart *duart = to_sport(uport)->duart; 694 struct sbd_duart *duart = to_sport(uport)->duart;
697 int map_guard; 695 int map_guard;
698 int ret = 0; 696 int ret = 0;
@@ -755,7 +753,7 @@ static int sbd_verify_port(struct uart_port *uport, struct serial_struct *ser)
755} 753}
756 754
757 755
758static struct uart_ops sbd_ops = { 756static const struct uart_ops sbd_ops = {
759 .tx_empty = sbd_tx_empty, 757 .tx_empty = sbd_tx_empty,
760 .set_mctrl = sbd_set_mctrl, 758 .set_mctrl = sbd_set_mctrl,
761 .get_mctrl = sbd_get_mctrl, 759 .get_mctrl = sbd_get_mctrl,