Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pc300: Update to tty_set_operations

This driver somehow escaped the tty operations changes way back when. Update
it so that we can switch to tty->ops shortly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
56dbbb9a 3e8e88ca

+15 -9
+15 -9
drivers/net/wan/pc300_tty.c
··· 178 178 CPC_TTY_UNLOCK(card,flags); 179 179 } 180 180 181 + 182 + static const struct tty_operations pc300_ops = { 183 + .open = cpc_tty_open, 184 + .close = cpc_tty_close, 185 + .write = cpc_tty_write, 186 + .write_room = cpc_tty_write_room, 187 + .chars_in_buffer = cpc_tty_chars_in_buffer, 188 + .tiocmset = pc300_tiocmset, 189 + .tiocmget = pc300_tiocmget, 190 + .flush_buffer = cpc_tty_flush_buffer, 191 + .hangup = cpc_tty_hangup, 192 + }; 193 + 194 + 181 195 /* 182 196 * PC300 TTY initialization routine 183 197 * ··· 239 225 serial_drv.flags = TTY_DRIVER_REAL_RAW; 240 226 241 227 /* interface routines from the upper tty layer to the tty driver */ 242 - serial_drv.open = cpc_tty_open; 243 - serial_drv.close = cpc_tty_close; 244 - serial_drv.write = cpc_tty_write; 245 - serial_drv.write_room = cpc_tty_write_room; 246 - serial_drv.chars_in_buffer = cpc_tty_chars_in_buffer; 247 - serial_drv.tiocmset = pc300_tiocmset; 248 - serial_drv.tiocmget = pc300_tiocmget; 249 - serial_drv.flush_buffer = cpc_tty_flush_buffer; 250 - serial_drv.hangup = cpc_tty_hangup; 228 + tty_set_operations(&serial_drv, &pc300_ops); 251 229 252 230 /* register the TTY driver */ 253 231 if (tty_register_driver(&serial_drv)) {