Re: [PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-14 Thread Johan Hovold
On Fri, Sep 14, 2018 at 04:23:52PM +0100, Al Viro wrote: > On Fri, Sep 14, 2018 at 03:39:30PM +0200, Johan Hovold wrote: > > > + if (port->serial->type->get_serial) > > > + return port->serial->type->get_serial(tty, ss); > > > + return -ENOIOCTLCMD; > > > +} > > > + > > > +static int

Re: [PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-14 Thread Johan Hovold
On Fri, Sep 14, 2018 at 04:23:52PM +0100, Al Viro wrote: > On Fri, Sep 14, 2018 at 03:39:30PM +0200, Johan Hovold wrote: > > > + if (port->serial->type->get_serial) > > > + return port->serial->type->get_serial(tty, ss); > > > + return -ENOIOCTLCMD; > > > +} > > > + > > > +static int

Re: [PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-14 Thread Al Viro
On Fri, Sep 14, 2018 at 03:39:30PM +0200, Johan Hovold wrote: > > + if (port->serial->type->get_serial) > > + return port->serial->type->get_serial(tty, ss); > > + return -ENOIOCTLCMD; > > +} > > + > > +static int serial_set_serial(struct tty_struct *tty, struct serial_struct > >

Re: [PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-14 Thread Al Viro
On Fri, Sep 14, 2018 at 03:39:30PM +0200, Johan Hovold wrote: > > + if (port->serial->type->get_serial) > > + return port->serial->type->get_serial(tty, ss); > > + return -ENOIOCTLCMD; > > +} > > + > > +static int serial_set_serial(struct tty_struct *tty, struct serial_struct > >

Re: [PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-14 Thread Johan Hovold
On Thu, Sep 13, 2018 at 03:40:16AM +0100, Al Viro wrote: > From: Al Viro > > add such methods for usb_serial_driver, provide tty_operations > ->[sg]et_serial() calling those. For now the lack of methods > in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), > making tty_ioctl() fall

Re: [PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-14 Thread Johan Hovold
On Thu, Sep 13, 2018 at 03:40:16AM +0100, Al Viro wrote: > From: Al Viro > > add such methods for usb_serial_driver, provide tty_operations > ->[sg]et_serial() calling those. For now the lack of methods > in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), > making tty_ioctl() fall

[PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro add such methods for usb_serial_driver, provide tty_operations ->[sg]et_serial() calling those. For now the lack of methods in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), making tty_ioctl() fall back to calling ->ioctl(). Once all drivers are converted, we'll be

[PATCH 17/50] usb-serial: begin switching to ->[sg]et_serial()

2018-09-12 Thread Al Viro
From: Al Viro add such methods for usb_serial_driver, provide tty_operations ->[sg]et_serial() calling those. For now the lack of methods in driver means ENOIOCTLCMD from usb-serial ->[sg]et_serial(), making tty_ioctl() fall back to calling ->ioctl(). Once all drivers are converted, we'll be