521 // FIXME empty ring buffer |
521 // FIXME empty ring buffer |
522 } |
522 } |
523 |
523 |
524 /*****************************************************************************/ |
524 /*****************************************************************************/ |
525 |
525 |
526 static int ec_tty_ioctl(struct tty_struct *tty, struct file *file, |
526 static int ec_tty_ioctl(struct tty_struct *tty, |
|
527 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) |
|
528 struct file *file, |
|
529 #endif |
527 unsigned int cmd, unsigned long arg) |
530 unsigned int cmd, unsigned long arg) |
528 { |
531 { |
529 ec_tty_t *t = (ec_tty_t *) tty->driver_data; |
532 ec_tty_t *t = (ec_tty_t *) tty->driver_data; |
530 int ret = -ENOTTY; |
533 int ret = -ENOTTY; |
531 |
534 |
532 #if EC_TTY_DEBUG >= 2 |
535 #if EC_TTY_DEBUG >= 2 |
533 printk(KERN_INFO PFX "%s(tty=%p, file=%p, cmd=%08x, arg=%08lx).\n", |
536 printk(KERN_INFO PFX "%s(tty=%p, " |
534 __func__, tty, file, cmd, arg); |
537 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) |
|
538 "file=%p, " |
|
539 #endif |
|
540 "cmd=%08x, arg=%08lx).\n", |
|
541 __func__, tty, |
|
542 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) |
|
543 file, |
|
544 #endif |
|
545 cmd, arg); |
535 printk(KERN_INFO PFX "decoded: type=%02x nr=%u\n", |
546 printk(KERN_INFO PFX "decoded: type=%02x nr=%u\n", |
536 _IOC_TYPE(cmd), _IOC_NR(cmd)); |
547 _IOC_TYPE(cmd), _IOC_NR(cmd)); |
537 #endif |
548 #endif |
538 |
549 |
539 switch (cmd) { |
550 switch (cmd) { |