aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 03:54:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:46 -0400
commit56dbbb9a5704f665068778d4d2c1bdf757756e60 (patch)
treedfdd477bf4dcc1020901e761e4ecd5b4105450fd /drivers/net
parent3e8e88ca053150efdbecb45d8f481cf560ec808d (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wan/pc300_tty.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c
index 63abfd72542d..e03eef2f2282 100644
--- a/drivers/net/wan/pc300_tty.c
+++ b/drivers/net/wan/pc300_tty.c
@@ -178,6 +178,20 @@ static void cpc_tty_signal_on(pc300dev_t *pc300dev, unsigned char signal)
178 CPC_TTY_UNLOCK(card,flags); 178 CPC_TTY_UNLOCK(card,flags);
179} 179}
180 180
181
182static 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 * PC300 TTY initialization routine 196 * PC300 TTY initialization routine
183 * 197 *
@@ -225,15 +239,7 @@ void cpc_tty_init(pc300dev_t *pc300dev)
225 serial_drv.flags = TTY_DRIVER_REAL_RAW; 239 serial_drv.flags = TTY_DRIVER_REAL_RAW;
226 240
227 /* interface routines from the upper tty layer to the tty driver */ 241 /* interface routines from the upper tty layer to the tty driver */
228 serial_drv.open = cpc_tty_open; 242 tty_set_operations(&serial_drv, &pc300_ops);
229 serial_drv.close = cpc_tty_close;
230 serial_drv.write = cpc_tty_write;
231 serial_drv.write_room = cpc_tty_write_room;
232 serial_drv.chars_in_buffer = cpc_tty_chars_in_buffer;
233 serial_drv.tiocmset = pc300_tiocmset;
234 serial_drv.tiocmget = pc300_tiocmget;
235 serial_drv.flush_buffer = cpc_tty_flush_buffer;
236 serial_drv.hangup = cpc_tty_hangup;
237 243
238 /* register the TTY driver */ 244 /* register the TTY driver */
239 if (tty_register_driver(&serial_drv)) { 245 if (tty_register_driver(&serial_drv)) {