diff options
-rw-r--r-- | drivers/char/Kconfig | 2 | ||||
-rw-r--r-- | drivers/tty/Makefile | 2 | ||||
-rw-r--r-- | drivers/tty/n_tracerouter.c (renamed from drivers/tty/ptirouter_ldisc.c) | 58 | ||||
-rw-r--r-- | include/linux/tty.h | 2 |
4 files changed, 32 insertions, 32 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 5a895c929e1..19a8bd940df 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -110,7 +110,7 @@ config BFIN_JTAG_COMM_CONSOLE bool "Console on Blackfin JTAG" depends on BFIN_JTAG_COMM=y -config PTI_ROUTER +config TRACE_ROUTER tristate "Trace data router for MIPI P1149.7 cJTAG standard" depends on INTEL_MID_PTI ---help--- diff --git a/drivers/tty/Makefile b/drivers/tty/Makefile index 3d0eee29d51..e5a3a270d92 100644 --- a/drivers/tty/Makefile +++ b/drivers/tty/Makefile @@ -7,6 +7,6 @@ obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o obj-$(CONFIG_N_HDLC) += n_hdlc.o obj-$(CONFIG_N_GSM) += n_gsm.o obj-$(CONFIG_R3964) += n_r3964.o -obj-$(CONFIG_PTI_ROUTER) += ptirouter_ldisc.o +obj-$(CONFIG_TRACE_ROUTER) += n_tracerouter.o obj-y += vt/ diff --git a/drivers/tty/ptirouter_ldisc.c b/drivers/tty/n_tracerouter.c index 7e72d419091..dbf1be006f2 100644 --- a/drivers/tty/ptirouter_ldisc.c +++ b/drivers/tty/n_tracerouter.c @@ -1,5 +1,5 @@ /* - * ptirouter_ldisc.c - PTI data router for JTAG data extration + * n_tracerouter.c - PTI data router for JTAG data extration * * Copyright (C) Intel 2010 * @@ -47,17 +47,17 @@ */ #define RECEIVE_ROOM 65536 -#define DRIVERNAME "ptirouter_ldisc" +#define DRIVERNAME "n_tracerouter" /** - * ptirouter_ldisc_open() - Called when a tty is opened by a SW entity. + * n_tracerouter_open() - Called when a tty is opened by a SW entity. * @tty: terminal device to the ldisc. * * Return: * 0 for success. */ -static int ptirouter_ldisc_open(struct tty_struct *tty) +static int n_tracerouter_open(struct tty_struct *tty) { tty->receive_room = RECEIVE_ROOM; tty_driver_flush_buffer(tty); @@ -65,18 +65,18 @@ static int ptirouter_ldisc_open(struct tty_struct *tty) } /** - * ptirouter_ldisc_close() - close connection + * n_tracerouter_close() - close connection * @tty: terminal device to the ldisc. * * Called when a software entity wants to close a connection. */ -static void ptirouter_ldisc_close(struct tty_struct *tty) +static void n_tracerouter_close(struct tty_struct *tty) { tty_driver_flush_buffer(tty); } /** - * ptirouter_ldisc_read() - read request from user space + * n_tracerouter_read() - read request from user space * @tty: terminal device passed into the ldisc. * @file: pointer to open file object. * @buf: pointer to the data buffer that gets eventually returned. @@ -84,7 +84,7 @@ static void ptirouter_ldisc_close(struct tty_struct *tty) * * function that allows read() functionality in userspace. By default if this * is not implemented it returns -EIO. This module is functioning like a - * router via ptirouter_ldisc_receivebuf(), and there is no real requirement + * router via n_tracerouter_receivebuf(), and there is no real requirement * to implement this function. However, an error return value other than * -EIO should be used just to show that there was an intent not to have * this function implemented. Return value based on read() man pages. @@ -92,13 +92,13 @@ static void ptirouter_ldisc_close(struct tty_struct *tty) * Return: * -EINVAL */ -ssize_t ptirouter_ldisc_read(struct tty_struct *tty, struct file *file, +ssize_t n_tracerouter_read(struct tty_struct *tty, struct file *file, unsigned char *buf, size_t nr) { return -EINVAL; } /** - * ptirouter_ldisc_write() - Function that allows write() in userspace. + * n_tracerouter_write() - Function that allows write() in userspace. * @tty: terminal device passed into the ldisc. * @file: pointer to open file object. * @buf: pointer to the data buffer that gets eventually returned. @@ -107,7 +107,7 @@ ssize_t ptirouter_ldisc_read(struct tty_struct *tty, struct file *file, * By default if this is not implemented, it returns -EIO. * This should not be implemented, ever, because * 1. this driver is functioning like a router via - * ptirouter_ldisc_receivebuf() + * n_tracerouter_receivebuf() * 2. No writes to HW will ever go through this line discpline driver. * However, an error return value other than -EIO should be used * just to show that there was an intent not to have this function @@ -116,13 +116,13 @@ ssize_t ptirouter_ldisc_read(struct tty_struct *tty, struct file *file, * Return: * -EINVAL */ -ssize_t ptirouter_ldisc_write(struct tty_struct *tty, struct file *file, +ssize_t n_tracerouter_write(struct tty_struct *tty, struct file *file, const unsigned char *buf, size_t nr) { return -EINVAL; } /** - * ptirouter_ldisc_receivebuf() - Routing function for driver. + * n_tracerouter_receivebuf() - Routing function for driver. * @tty: terminal device passed into the ldisc. It's assumed * tty will never be NULL. * @cp: buffer, block of characters to be eventually read by @@ -133,7 +133,7 @@ ssize_t ptirouter_ldisc_write(struct tty_struct *tty, struct file *file, * This function takes the input buffer, cp, and passes it to * an external API function for processing. */ -static void ptirouter_ldisc_receivebuf(struct tty_struct *tty, +static void n_tracerouter_receivebuf(struct tty_struct *tty, const unsigned char *cp, char *fp, int count) { @@ -151,27 +151,27 @@ static struct tty_ldisc_ops tty_ptirouter_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, .name = DRIVERNAME, - .open = ptirouter_ldisc_open, - .close = ptirouter_ldisc_close, - .read = ptirouter_ldisc_read, - .write = ptirouter_ldisc_write, - .receive_buf = ptirouter_ldisc_receivebuf + .open = n_tracerouter_open, + .close = n_tracerouter_close, + .read = n_tracerouter_read, + .write = n_tracerouter_write, + .receive_buf = n_tracerouter_receivebuf }; /** - * ptirouter_ldisc_init - module initialisation + * n_tracerouter_init - module initialisation * * Registers this module as a line discipline driver. * * Return: * 0 for success, any other value error. */ -static int __init ptirouter_ldisc_init(void) +static int __init n_tracerouter_init(void) { int retval; - /* Note N_PTIR is defined in linux/tty.h */ - retval = tty_register_ldisc(N_PTIR, &tty_ptirouter_ldisc); + /* Note N_TRACEROUTER is defined in linux/tty.h */ + retval = tty_register_ldisc(N_TRACEROUTER, &tty_ptirouter_ldisc); if (retval < 0) pr_err("%s: Registration failed: %d\n", __func__, retval); @@ -179,24 +179,24 @@ static int __init ptirouter_ldisc_init(void) } /** - * ptirouter_ldisc_exit - - module unload + * n_tracerouter_exit - - module unload * * Removes this module as a line discipline driver. */ -static void __exit ptirouter_ldisc_exit(void) +static void __exit n_tracerouter_exit(void) { int retval; - retval = tty_unregister_ldisc(N_PTIR); + retval = tty_unregister_ldisc(N_TRACEROUTER); if (retval < 0) pr_err("%s: Unregistration failed: %d\n", __func__, retval); } -module_init(ptirouter_ldisc_init); -module_exit(ptirouter_ldisc_exit); +module_init(n_tracerouter_init); +module_exit(n_tracerouter_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Jay Freyensee"); -MODULE_ALIAS_LDISC(N_PTIR); +MODULE_ALIAS_LDISC(N_TRACEROUTER); MODULE_DESCRIPTION("PTI Router ldisc driver"); diff --git a/include/linux/tty.h b/include/linux/tty.h index cfbfbabdbf6..8c3be65bc5e 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -50,7 +50,7 @@ #define N_CAIF 20 /* CAIF protocol for talking to modems */ #define N_GSM0710 21 /* GSM 0710 Mux */ #define N_TI_WL 22 /* for TI's WL BT, FM, GPS combo chips */ -#define N_PTIR 23 /* PTI cJTAG data routing for MIPI P1149.7 */ +#define N_TRACEROUTER 23 /* Trace data routing for MIPI P1149.7 */ /* * This character is the same as _POSIX_VDISABLE: it cannot be used as |