Skip to contentSkip to conversation

tty: define tty_open_by_driver when CONFIG_TTY is not defined

PATCH In review Okash Khawaja 2 participants 4 messages Jun 17, 2017 – Jun 19, 2017 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

This patch adds definition of tty_open_by_driver when CONFIG_TTY is not defined. This was supposed to have been included in commit 12e84c71b7d4ee38d51377fd494ac748ee4e6912 ("tty: export tty_open_by_driver"). The patch follows convention for other such functions and returns NULL.

---
 include/linux/tty.h |    3 +++
 1 file changed, 3 insertions(+)
include/linux/tty.h +3 -0
@@ -422,6 +422,9 @@ static inline int __init tty_init(void)
 { return 0; }
 static inline const char *tty_name(const struct tty_struct *tty)
 { return "(none)"; }
+static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
+		struct file *filp)
+{ return NULL; }
 #endif
 
 extern struct ktermios tty_std_termios;
#1 lore raw
Quoted 15 lines · Okash Khawaja, on sam. 17 juin 2017 10:46:41 +0100, wrote:

This patch adds definition of tty_open_by_driver when CONFIG_TTY is not defined. This was supposed to have been included in commit 12e84c71b7d4ee38d51377fd494ac748ee4e6912 ("tty: export tty_open_by_driver"). The patch follows convention for other such functions and returns NULL.

---
 include/linux/tty.h |    3 +++
 1 file changed, 3 insertions(+)

include/linux/tty.h static inline int __init tty_init(void) · line 427

Quoted 6 lines
include/linux/tty.h +3 -0
@@ -422,6 +422,9 @@ static inline int __init tty_init(void)
 { return 0; }
 static inline const char *tty_name(const struct tty_struct *tty)
 { return "(none)"; }
+static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
+		struct file *filp)
+{ return NULL; }

Add inline

Samuel

#2 lore raw

PATCH v2 1/1 tty: define tty_open_by_driver when CONFIG_TTY is not defined

This patch adds definition of tty_open_by_driver when CONFIG_TTY is not defined. This was supposed to have been included in commit 12e84c71b7d4ee38d51377fd494ac748ee4e6912 ("tty: export tty_open_by_driver"). The patch follows convention for other such functions and returns NULL.

---
 include/linux/tty.h |    3 +++
 1 file changed, 3 insertions(+)
include/linux/tty.h +3 -0
@@ -422,6 +422,9 @@ static inline int __init tty_init(void)
 { return 0; }
 static inline const char *tty_name(const struct tty_struct *tty)
 { return "(none)"; }
+static inline struct tty_struct *tty_open_by_driver(dev_t device,
+		struct inode *inode, struct file *filp)
+{ return NULL; }
 #endif
 
 extern struct ktermios tty_std_termios;
Reviewed-by on v2 1/1
#3 lore raw
Quoted 7 lines · Okash Khawaja, on sam. 17 juin 2017 22:32:55 +0100, wrote:

This patch adds definition of tty_open_by_driver when CONFIG_TTY is not defined. This was supposed to have been included in commit 12e84c71b7d4ee38d51377fd494ac748ee4e6912 ("tty: export tty_open_by_driver"). The patch follows convention for other such functions and returns NULL.

Quoted 18 lines
---
 include/linux/tty.h |    3 +++
 1 file changed, 3 insertions(+)
include/linux/tty.h +3 -0
@@ -422,6 +422,9 @@ static inline int __init tty_init(void)
 { return 0; }
 static inline const char *tty_name(const struct tty_struct *tty)
 { return "(none)"; }
+static inline struct tty_struct *tty_open_by_driver(dev_t device,
+		struct inode *inode, struct file *filp)
+{ return NULL; }
 #endif
 
 extern struct ktermios tty_std_termios;
Signature · 4 lines
Samuel
<O> Ça peut être une madeleine à sous munitions (avec des composants,
par exemple)
 -+- #runtime -+-