kfree(tty->disc_data);
}
-static size_t spk_ttyio_receive_buf2(struct tty_struct *tty,
- const unsigned char *cp, const char *fp,
- size_t count)
+static size_t spk_ttyio_receive_buf2(struct tty_struct *tty, const u8 *cp,
+ const char *fp, size_t count)
{
struct spk_ldisc_data *ldisc_data = tty->disc_data;
struct spk_synth *synth = ldisc_data->synth;
* 'interrupt' routine.
*/
-static void serport_ldisc_receive(struct tty_struct *tty,
- const unsigned char *cp, const char *fp,
- size_t count)
+static void serport_ldisc_receive(struct tty_struct *tty, const u8 *cp,
+ const char *fp, size_t count)
{
struct serport *serport = tty->disc_data;
unsigned long flags;
pr_debug("%s: done ", __func__);
}
-static void st_tty_receive(struct tty_struct *tty, const unsigned char *data,
+static void st_tty_receive(struct tty_struct *tty, const u8 *data,
const char *tty_flags, size_t count)
{
#ifdef VERBOSE
* This will not be re-entered while running, but other ldisc
* functions may be called in parallel.
*/
-static void can327_ldisc_rx(struct tty_struct *tty, const unsigned char *cp,
+static void can327_ldisc_rx(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count)
{
struct can327 *elm = tty->disc_data;
* be re-entered while running but other ldisc functions may be called
* in parallel
*/
-static void slcan_receive_buf(struct tty_struct *tty,
- const unsigned char *cp, const char *fp,
- size_t count)
+static void slcan_receive_buf(struct tty_struct *tty, const u8 *cp,
+ const char *fp, size_t count)
{
struct slcan *sl = tty->disc_data;
* a block of 6pack data has been received, which can now be decapsulated
* and sent on to some IP layer for further processing.
*/
-static void sixpack_receive_buf(struct tty_struct *tty,
- const unsigned char *cp, const char *fp, size_t count)
+static void sixpack_receive_buf(struct tty_struct *tty, const u8 *cp,
+ const char *fp, size_t count)
{
struct sixpack *sp;
int count1;
* a block of data has been received, which can now be decapsulated
* and sent on to the AX.25 layer for further processing.
*/
-static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp,
+static void mkiss_receive_buf(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count)
{
struct mkiss *ax = mkiss_get(tty);
}
}
-static void mctp_serial_tty_receive_buf(struct tty_struct *tty,
- const unsigned char *c,
+static void mctp_serial_tty_receive_buf(struct tty_struct *tty, const u8 *c,
const char *f, size_t len)
{
struct mctp_serial *dev = tty->disc_data;
/* May sleep, don't call from interrupt level or with interrupts disabled */
static void
-ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
- const char *cflags, size_t count)
+ppp_asynctty_receive(struct tty_struct *tty, const u8 *buf, const char *cflags,
+ size_t count)
{
struct asyncppp *ap = ap_get(tty);
unsigned long flags;
other ldisc functions but will not be re-entered */
static void
-ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
- const char *flags, int count)
+ppp_async_input(struct asyncppp *ap, const u8 *buf, const char *flags,
+ int count)
{
struct sk_buff *skb;
int c, i, j, n, s, f;
static void ppp_sync_process(struct tasklet_struct *t);
static int ppp_sync_push(struct syncppp *ap);
static void ppp_sync_flush_output(struct syncppp *ap);
-static void ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
- const char *flags, int count);
+static void ppp_sync_input(struct syncppp *ap, const u8 *buf, const char *flags,
+ int count);
static const struct ppp_channel_ops sync_ops = {
.start_xmit = ppp_sync_send,
/* May sleep, don't call from interrupt level or with interrupts disabled */
static void
-ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
- const char *cflags, size_t count)
+ppp_sync_receive(struct tty_struct *tty, const u8 *buf, const char *cflags,
+ size_t count)
{
struct syncppp *ap = sp_get(tty);
unsigned long flags;
* frame is considered to be in error and is tossed.
*/
static void
-ppp_sync_input(struct syncppp *ap, const unsigned char *buf,
- const char *flags, int count)
+ppp_sync_input(struct syncppp *ap, const u8 *buf, const char *flags, int count)
{
struct sk_buff *skb;
unsigned char *p;
* in parallel
*/
-static void slip_receive_buf(struct tty_struct *tty, const unsigned char *cp,
+static void slip_receive_buf(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count)
{
struct slip *sl = tty->disc_data;
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;
* 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;
}
/* 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;
}
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;
}
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;
}
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;
}
}
-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++;
}
}
-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;
* 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;
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);
}
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
*
* 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;
*
* 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;
* 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;
* 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);
*
* 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);
}
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)
* 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;
unsigned long data[];
};
-static inline unsigned char *char_buf_ptr(struct tty_buffer *b, int ofs)
+static inline u8 *char_buf_ptr(struct tty_buffer *b, int ofs)
{
- return ((unsigned char *)b->data) + ofs;
+ return ((u8 *)b->data) + ofs;
}
static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs)
int tty_buffer_set_limit(struct tty_port *port, int limit);
unsigned int tty_buffer_space_avail(struct tty_port *port);
int tty_buffer_request_room(struct tty_port *port, size_t size);
-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_fixed_flag(struct tty_port *port,
- const unsigned char *chars, char flag, size_t size);
-int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
- size_t size);
+int tty_insert_flip_string_flags(struct tty_port *port, const u8 *chars,
+ const char *flags, size_t size);
+int tty_insert_flip_string_fixed_flag(struct tty_port *port, const u8 *chars,
+ char flag, size_t size);
+int tty_prepare_flip_string(struct tty_port *port, u8 **chars, size_t size);
void tty_flip_buffer_push(struct tty_port *port);
-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);
-static inline int tty_insert_flip_char(struct tty_port *port,
- unsigned char ch, char flag)
+static inline int tty_insert_flip_char(struct tty_port *port, u8 ch, char flag)
{
struct tty_buffer *tb = port->buf.tail;
int change;
}
static inline int tty_insert_flip_string(struct tty_port *port,
- const unsigned char *chars, size_t size)
+ const u8 *chars, size_t size)
{
return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size);
}
-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);
void tty_buffer_lock_exclusive(struct tty_port *port);
void tty_buffer_unlock_exclusive(struct tty_port *port);
*
* Optional. Can sleep.
*
- * @receive_buf: [DRV] ``void ()(struct tty_struct *tty,
- * const unsigned char *cp, const char *fp, size_t count)``
+ * @receive_buf: [DRV] ``void ()(struct tty_struct *tty, const u8 *cp,
+ * const char *fp, size_t count)``
*
* This function is called by the low-level tty driver to send characters
* received by the hardware to the line discpline for processing. @cp is
*
* Optional.
*
- * @receive_buf2: [DRV] ``ssize_t ()(struct tty_struct *tty,
- * const unsigned char *cp, const char *fp, size_t count)``
+ * @receive_buf2: [DRV] ``ssize_t ()(struct tty_struct *tty, const u8 *cp,
+ * const char *fp, size_t count)``
*
* This function is called by the low-level tty driver to send characters
* received by the hardware to the line discpline for processing. @cp is a
*
* Optional.
*
- * @lookahead_buf: [DRV] ``void ()(struct tty_struct *tty,
- * const unsigned char *cp, const char *fp, size_t count)``
+ * @lookahead_buf: [DRV] ``void ()(struct tty_struct *tty, const u8 *cp,
+ * const char *fp, size_t count)``
*
* This function is called by the low-level tty driver for characters
* not eaten by ->receive_buf() or ->receive_buf2(). It is useful for
/*
* The following routines are called from below.
*/
- void (*receive_buf)(struct tty_struct *tty, const unsigned char *cp,
+ void (*receive_buf)(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count);
void (*write_wakeup)(struct tty_struct *tty);
void (*dcd_change)(struct tty_struct *tty, bool active);
- size_t (*receive_buf2)(struct tty_struct *tty, const unsigned char *cp,
+ size_t (*receive_buf2)(struct tty_struct *tty, const u8 *cp,
const char *fp, size_t count);
- void (*lookahead_buf)(struct tty_struct *tty, const unsigned char *cp,
+ void (*lookahead_buf)(struct tty_struct *tty, const u8 *cp,
const unsigned char *fp, size_t count);
struct module *owner;
}
/* Line discipline .receive_buf() */
-static void v253_receive(struct tty_struct *tty, const unsigned char *cp,
- const char *fp, size_t count)
+static void v253_receive(struct tty_struct *tty, const u8 *cp, const char *fp,
+ size_t count)
{
struct snd_soc_component *component = tty->disc_data;
struct cx20442_priv *cx20442;
}
/* Line discipline .receive_buf() */
-static void cx81801_receive(struct tty_struct *tty, const unsigned char *cp,
+static void cx81801_receive(struct tty_struct *tty, const u8 *cp,
const char *fp, int count)
{
struct snd_soc_component *component = tty->disc_data;