tty/module.c: fix prototype of ec_tty_write for >= 6.6

Upstream commit 95713967ba523 changed the prototype of tty_operations::write.
This commit is contained in:
Rasmus Villemoes 2024-01-05 21:58:47 +01:00
parent a79632cdcd
commit 70f54841a4
1 changed files with 11 additions and 2 deletions

View File

@ -496,17 +496,26 @@ static void ec_tty_close(struct tty_struct *tty, struct file *file)
/*****************************************************************************/
static int ec_tty_write(
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
static ssize_t
#else
static int
#endif
ec_tty_write(
struct tty_struct *tty,
const unsigned char *buffer,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
size_t count
#else
int count
#endif
)
{
ec_tty_t *t = (ec_tty_t *) tty->driver_data;
unsigned int data_size, i;
#if EC_TTY_DEBUG >= 1
printk(KERN_INFO PFX "%s(count=%i)\n", __func__, count);
printk(KERN_INFO PFX "%s(count=%i)\n", __func__, (int)count);
#endif
if (count <= 0) {