OMAP3: SR: Fix init voltage on OPP change
[linux-ginger.git] / include / linux / devpts_fs.h
blob5ce0e5fd712e0fe67d0e05b455fffbb85c16fb7c
1 /* -*- linux-c -*- --------------------------------------------------------- *
3 * linux/include/linux/devpts_fs.h
5 * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
7 * This file is part of the Linux kernel and is made available under
8 * the terms of the GNU General Public License, version 2, or at your
9 * option, any later version, incorporated herein by reference.
11 * ------------------------------------------------------------------------- */
13 #ifndef _LINUX_DEVPTS_FS_H
14 #define _LINUX_DEVPTS_FS_H
16 #include <linux/errno.h>
18 #ifdef CONFIG_UNIX98_PTYS
20 int devpts_new_index(struct inode *ptmx_inode);
21 void devpts_kill_index(struct inode *ptmx_inode, int idx);
22 /* mknod in devpts */
23 int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty);
24 /* get tty structure */
25 struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number);
26 /* unlink */
27 void devpts_pty_kill(struct tty_struct *tty);
29 #else
31 /* Dummy stubs in the no-pty case */
32 static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; }
33 static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { }
34 static inline int devpts_pty_new(struct inode *ptmx_inode,
35 struct tty_struct *tty)
37 return -EINVAL;
39 static inline struct tty_struct *devpts_get_tty(struct inode *pts_inode,
40 int number)
42 return NULL;
44 static inline void devpts_pty_kill(struct tty_struct *tty) { }
46 #endif
49 #endif /* _LINUX_DEVPTS_FS_H */