aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-07-23 09:43:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-27 12:17:21 +0200
commitcb9ea618ee60313d9278b2ba75f56da2531c8cac (patch)
tree9d2972ab6e358432675b93298ea15fd8a95dc78e /include/linux/tty_driver.h
parenttty: drop alloc_tty_driver (diff)
downloadlinux-dev-cb9ea618ee60313d9278b2ba75f56da2531c8cac.tar.xz
linux-dev-cb9ea618ee60313d9278b2ba75f56da2531c8cac.zip
tty: make tty_set_operations an inline
Since commit f34d7a5b7010 (tty: The big operations rework) in 2008, tty_set_operations() is a simple one-line assignment. There is no reason for this to be an exported function, hence move it to a header and make an inline from that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210723074317.32690-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r--include/linux/tty_driver.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index c7746dee58a6..6092ce9180aa 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -330,8 +330,6 @@ extern struct list_head tty_drivers;
extern struct tty_driver *__tty_alloc_driver(unsigned int lines,
struct module *owner, unsigned long flags);
extern void put_tty_driver(struct tty_driver *driver);
-extern void tty_set_operations(struct tty_driver *driver,
- const struct tty_operations *op);
extern struct tty_driver *tty_find_polling_driver(char *name, int *line);
extern void tty_driver_kref_put(struct tty_driver *driver);
@@ -346,6 +344,12 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
return d;
}
+static inline void tty_set_operations(struct tty_driver *driver,
+ const struct tty_operations *op)
+{
+ driver->ops = op;
+}
+
/* tty driver magic number */
#define TTY_DRIVER_MAGIC 0x5402