diff options
Diffstat (limited to 'drivers/tty/hvc/hvsi_lib.c')
-rw-r--r-- | drivers/tty/hvc/hvsi_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c index 3396eb9d57a..bd9b09827b2 100644 --- a/drivers/tty/hvc/hvsi_lib.c +++ b/drivers/tty/hvc/hvsi_lib.c | |||
@@ -183,7 +183,7 @@ int hvsilib_get_chars(struct hvsi_priv *pv, char *buf, int count) | |||
183 | unsigned int tries, read = 0; | 183 | unsigned int tries, read = 0; |
184 | 184 | ||
185 | if (WARN_ON(!pv)) | 185 | if (WARN_ON(!pv)) |
186 | return -ENXIO; | 186 | return 0; |
187 | 187 | ||
188 | /* If we aren't open, don't do anything in order to avoid races | 188 | /* If we aren't open, don't do anything in order to avoid races |
189 | * with connection establishment. The hvc core will call this | 189 | * with connection establishment. The hvc core will call this |
@@ -234,7 +234,7 @@ int hvsilib_put_chars(struct hvsi_priv *pv, const char *buf, int count) | |||
234 | int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA); | 234 | int rc, adjcount = min(count, HVSI_MAX_OUTGOING_DATA); |
235 | 235 | ||
236 | if (WARN_ON(!pv)) | 236 | if (WARN_ON(!pv)) |
237 | return -ENODEV; | 237 | return 0; |
238 | 238 | ||
239 | dp.hdr.type = VS_DATA_PACKET_HEADER; | 239 | dp.hdr.type = VS_DATA_PACKET_HEADER; |
240 | dp.hdr.len = adjcount + sizeof(struct hvsi_header); | 240 | dp.hdr.len = adjcount + sizeof(struct hvsi_header); |
@@ -377,7 +377,7 @@ int hvsilib_open(struct hvsi_priv *pv, struct hvc_struct *hp) | |||
377 | pr_devel("HVSI@%x: open !\n", pv->termno); | 377 | pr_devel("HVSI@%x: open !\n", pv->termno); |
378 | 378 | ||
379 | /* Keep track of the tty data structure */ | 379 | /* Keep track of the tty data structure */ |
380 | pv->tty = tty_port_tty_get(&hp->port); | 380 | pv->tty = tty_kref_get(hp->tty); |
381 | 381 | ||
382 | hvsilib_establish(pv); | 382 | hvsilib_establish(pv); |
383 | 383 | ||
@@ -400,7 +400,7 @@ void hvsilib_close(struct hvsi_priv *pv, struct hvc_struct *hp) | |||
400 | spin_unlock_irqrestore(&hp->lock, flags); | 400 | spin_unlock_irqrestore(&hp->lock, flags); |
401 | 401 | ||
402 | /* Clear our own DTR */ | 402 | /* Clear our own DTR */ |
403 | if (!pv->tty || (pv->tty->termios.c_cflag & HUPCL)) | 403 | if (!pv->tty || (pv->tty->termios->c_cflag & HUPCL)) |
404 | hvsilib_write_mctrl(pv, 0); | 404 | hvsilib_write_mctrl(pv, 0); |
405 | 405 | ||
406 | /* Tear down the connection */ | 406 | /* Tear down the connection */ |