コード例 #1
0
ファイル: tty.c プロジェクト: mikeberkelaar/grhardened
static int ipw_tiocmget(struct tty_struct *linux_tty, struct file *file)
{
	struct ipw_tty *tty = linux_tty->driver_data;
	/* FIXME: Exactly how is the tty object locked here .. */

	if (!tty)
		return -ENODEV;

	if (!atomic_read(&tty->open_count))
		return -EINVAL;

	return get_control_lines(tty);
}
コード例 #2
0
ファイル: tty.c プロジェクト: mikuhatsune001/linux2.6.32
static int ipw_tiocmget(struct tty_struct *linux_tty)
{
	struct ipw_tty *tty = linux_tty->driver_data;
	/* FIXME: Exactly how is the tty object locked here .. */

	if (!tty)
		return -ENODEV;

	if (!tty->port.count)
		return -EINVAL;

	return get_control_lines(tty);
}