From f601bbf2494d5d4f3dbc8dd3cda8aaad27ae9768 Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Tue, 12 Feb 2013 11:34:54 +0100 Subject: [PATCH] TTY ioctl() file parameter was dropped in kernel 2.6.39. --- tty/module.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tty/module.c b/tty/module.c index 042e7108..18c55291 100644 --- a/tty/module.c +++ b/tty/module.c @@ -523,15 +523,26 @@ static void ec_tty_flush_buffer(struct tty_struct *tty) /*****************************************************************************/ -static int ec_tty_ioctl(struct tty_struct *tty, struct file *file, +static int ec_tty_ioctl(struct tty_struct *tty, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) + struct file *file, +#endif unsigned int cmd, unsigned long arg) { ec_tty_t *t = (ec_tty_t *) tty->driver_data; int ret = -ENOTTY; #if EC_TTY_DEBUG >= 2 - printk(KERN_INFO PFX "%s(tty=%p, file=%p, cmd=%08x, arg=%08lx).\n", - __func__, tty, file, cmd, arg); + printk(KERN_INFO PFX "%s(tty=%p, " +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) + "file=%p, " +#endif + "cmd=%08x, arg=%08lx).\n", + __func__, tty, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) + file, +#endif + cmd, arg); printk(KERN_INFO PFX "decoded: type=%02x nr=%u\n", _IOC_TYPE(cmd), _IOC_NR(cmd)); #endif