summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/n_gsm.c2
-rw-r--r--drivers/tty/n_hdlc.c2
-rw-r--r--drivers/tty/n_tty.c28
-rw-r--r--drivers/tty/tty.h2
-rw-r--r--drivers/tty/tty_buffer.c21
5 files changed, 27 insertions, 28 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 2f85877b8ba1..86d89bbbaa16 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -3489,7 +3489,7 @@ static void gsmld_detach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
gsm->tty = NULL;
}
-static void gsmld_receive_buf(struct tty_struct *tty, const unsigned char *cp,
+static void gsmld_receive_buf(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count)
{
struct gsm_mux *gsm = tty->disc_data;
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index ce3c779f5c03..c86be060baed 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -369,7 +369,7 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
* Called by tty low level driver when receive data is available. Data is
* interpreted as one HDLC frame.
*/
-static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
+static void n_hdlc_tty_receive(struct tty_struct *tty, const u8 *data,
const char *flags, size_t count)
{
register struct n_hdlc *n_hdlc = tty->disc_data;
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index ee9b20dcbce6..d770007e5215 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -1479,7 +1479,7 @@ n_tty_receive_char_lnext(struct tty_struct *tty, unsigned char c, char flag)
}
/* Caller must ensure count > 0 */
-static void n_tty_lookahead_flow_ctrl(struct tty_struct *tty, const unsigned char *cp,
+static void n_tty_lookahead_flow_ctrl(struct tty_struct *tty, const u8 *cp,
const unsigned char *fp, size_t count)
{
struct n_tty_data *ldata = tty->disc_data;
@@ -1500,8 +1500,8 @@ static void n_tty_lookahead_flow_ctrl(struct tty_struct *tty, const unsigned cha
}
static void
-n_tty_receive_buf_real_raw(const struct tty_struct *tty,
- const unsigned char *cp, int count)
+n_tty_receive_buf_real_raw(const struct tty_struct *tty, const u8 *cp,
+ int count)
{
struct n_tty_data *ldata = tty->disc_data;
size_t n, head;
@@ -1520,7 +1520,7 @@ n_tty_receive_buf_real_raw(const struct tty_struct *tty,
}
static void
-n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
+n_tty_receive_buf_raw(struct tty_struct *tty, const u8 *cp,
const char *fp, int count)
{
struct n_tty_data *ldata = tty->disc_data;
@@ -1537,7 +1537,7 @@ n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp,
}
static void
-n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
+n_tty_receive_buf_closing(struct tty_struct *tty, const u8 *cp,
const char *fp, int count, bool lookahead_done)
{
char flag = TTY_NORMAL;
@@ -1550,14 +1550,15 @@ n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp,
}
}
-static void n_tty_receive_buf_standard(struct tty_struct *tty,
- const unsigned char *cp, const char *fp, int count, bool lookahead_done)
+static void n_tty_receive_buf_standard(struct tty_struct *tty, const u8 *cp,
+ const char *fp, int count,
+ bool lookahead_done)
{
struct n_tty_data *ldata = tty->disc_data;
char flag = TTY_NORMAL;
while (count--) {
- unsigned char c = *cp++;
+ u8 c = *cp++;
if (fp)
flag = *fp++;
@@ -1588,7 +1589,7 @@ static void n_tty_receive_buf_standard(struct tty_struct *tty,
}
}
-static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
+static void __receive_buf(struct tty_struct *tty, const u8 *cp,
const char *fp, int count)
{
struct n_tty_data *ldata = tty->disc_data;
@@ -1663,7 +1664,7 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
* publishes commit_head or canon_head
*/
static size_t
-n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
+n_tty_receive_buf_common(struct tty_struct *tty, const u8 *cp,
const char *fp, int count, int flow)
{
struct n_tty_data *ldata = tty->disc_data;
@@ -1744,15 +1745,14 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
return rcvd;
}
-static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
+static void n_tty_receive_buf(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count)
{
n_tty_receive_buf_common(tty, cp, fp, count, 0);
}
-static size_t n_tty_receive_buf2(struct tty_struct *tty,
- const unsigned char *cp, const char *fp,
- size_t count)
+static size_t n_tty_receive_buf2(struct tty_struct *tty, const u8 *cp,
+ const char *fp, size_t count)
{
return n_tty_receive_buf_common(tty, cp, fp, count, 1);
}
diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index 2751ac3946e7..e31cd9f281de 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -115,6 +115,6 @@ static inline void tty_audit_tiocsti(const struct tty_struct *tty, char ch)
ssize_t redirected_tty_write(struct kiocb *, struct iov_iter *);
int tty_insert_flip_string_and_push_buffer(struct tty_port *port,
- const unsigned char *chars, size_t cnt);
+ const u8 *chars, size_t cnt);
#endif
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 56f5732ce47f..9db42e6ed45b 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -316,8 +316,8 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
*
* Returns: the number added.
*/
-int tty_insert_flip_string_fixed_flag(struct tty_port *port,
- const unsigned char *chars, char flag, size_t size)
+int tty_insert_flip_string_fixed_flag(struct tty_port *port, const u8 *chars,
+ char flag, size_t size)
{
int copied = 0;
bool flags = flag != TTY_NORMAL;
@@ -355,8 +355,8 @@ EXPORT_SYMBOL(tty_insert_flip_string_fixed_flag);
*
* Returns: the number added.
*/
-int tty_insert_flip_string_flags(struct tty_port *port,
- const unsigned char *chars, const char *flags, size_t size)
+int tty_insert_flip_string_flags(struct tty_port *port, const u8 *chars,
+ const char *flags, size_t size)
{
int copied = 0;
@@ -390,7 +390,7 @@ EXPORT_SYMBOL(tty_insert_flip_string_flags);
* Queue a single byte @ch to the tty buffering, with an optional flag. This is
* the slow path of tty_insert_flip_char().
*/
-int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)
+int __tty_insert_flip_char(struct tty_port *port, u8 ch, char flag)
{
struct tty_buffer *tb;
bool flags = flag != TTY_NORMAL;
@@ -421,8 +421,7 @@ EXPORT_SYMBOL(__tty_insert_flip_char);
* Returns: the length available and buffer pointer (@chars) to the space which
* is now allocated and accounted for as ready for normal characters.
*/
-int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
- size_t size)
+int tty_prepare_flip_string(struct tty_port *port, u8 **chars, size_t size)
{
int space = __tty_buffer_request_room(port, size, false);
@@ -450,8 +449,8 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
*
* Returns: the number of bytes processed.
*/
-size_t tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
- const char *f, size_t count)
+size_t tty_ldisc_receive_buf(struct tty_ldisc *ld, const u8 *p, const char *f,
+ size_t count)
{
if (ld->ops->receive_buf2)
count = ld->ops->receive_buf2(ld->tty, p, f, count);
@@ -489,7 +488,7 @@ static void lookahead_bufs(struct tty_port *port, struct tty_buffer *head)
}
if (port->client_ops->lookahead_buf) {
- unsigned char *p, *f = NULL;
+ u8 *p, *f = NULL;
p = char_buf_ptr(head, head->lookahead);
if (head->flags)
@@ -620,7 +619,7 @@ EXPORT_SYMBOL(tty_flip_buffer_push);
* Returns: the number added.
*/
int tty_insert_flip_string_and_push_buffer(struct tty_port *port,
- const unsigned char *chars, size_t size)
+ const u8 *chars, size_t size)
{
struct tty_bufhead *buf = &port->buf;
unsigned long flags;