aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/gdm724x
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 13:15:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 13:15:23 -0700
commit57a39f6d727f240f61fd6262195f6dd635939522 (patch)
treeeb7e5ec75f9f985f6f09896c27115ad49920e1e9 /drivers/staging/gdm724x
parent61e121047645122c47714fcda684d0ee67f444af (diff)
staging: gdm724x: gdm_tty: fix tty api build warnings
This fixes the build warnings due to changes in the tty api. Note, I don't know if the reference counting is correct, but at least there are no more build warnings. Also the tty code needs to be reworked, no static arrays of tty devices and the like... Cc: Won Kang <wonkang@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm724x')
-rw-r--r--drivers/staging/gdm724x/gdm_tty.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 4d4040e3b101..64904e012dc8 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -131,7 +131,7 @@ static void gdm_tty_close(struct tty_struct *tty, struct file *filp)
static int gdm_tty_recv_complete(void *data, int len, int index, int minor, int complete)
{
struct tty_str *tty_str = g_tty_str[index][minor];
- struct tty_struct *tty;
+ struct tty_port *tty_port;
if (!GDM_TTY_READY(tty_str)) {
if (complete == RECV_PACKET_PROCESS_COMPLETE)
@@ -142,17 +142,15 @@ static int gdm_tty_recv_complete(void *data, int len, int index, int minor, int
if (!data || !len)
goto complete_routine;
- tty = tty_port_tty_get(&tty_str->port);
+ tty_port = &tty_str->port;
- if (tty_buffer_request_room(tty, len) == len) {
- tty_insert_flip_string(tty, data, len);
- tty_flip_buffer_push(tty);
+ if (tty_buffer_request_room(tty_port, len) == len) {
+ tty_insert_flip_string(tty_port, data, len);
+ tty_flip_buffer_push(tty_port);
} else {
- tty_kref_put(tty);
return TO_HOST_BUFFER_REQUEST_FAIL;
}
- tty_kref_put(tty);
complete_routine:
if (complete == RECV_PACKET_PROCESS_COMPLETE)
gdm_tty_recv(tty_str, gdm_tty_recv_complete);

Privacy Policy