lkml.org 
[lkml]   [2007]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tiny tty driver sample
> I guess something like
>
> tty_buffer_request_room(tty, data_size);
> for (i = 0; i < data_size; ++i)
> work += tty_insert_flip_char(tty, data[i], TTY_NORMAL);
> if (work)
> tty_flip_buffer_push(tty);


Unless data_size can be very large and high speed then you can replace the
lot with

if (tty_insert_flip_string(tty, data, data_size))
tty_flip_buffer_push(tty);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-07 18:23    [W:0.065 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site