lkml.org 
[lkml]   [2009]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] tty: bfin_jtag_comm: emulate a TTY over the Blackfin EMUDAT/JTAG interface
    On 06/02/2009 09:25 PM, Mike Frysinger wrote:
    > diff --git a/drivers/char/bfin_jtag_comm.c b/drivers/char/bfin_jtag_comm.c
    > new file mode 100644
    > index 0000000..854f265
    > --- /dev/null
    > +++ b/drivers/char/bfin_jtag_comm.c
    > @@ -0,0 +1,365 @@
    > +#define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })

    This should be __initconst.

    > +#define debug(fmt, args...) pr_debug(DRV_NAME ": " fmt, ## args)

    Just define pr_fmt, instead of yet another debug macro.

    > +static void
    > +bfin_jc_wait_until_sent(struct tty_struct *tty, int timeout)
    > +{
    > + unsigned long expire = jiffies + timeout;
    > + while (!circ_empty(&bfin_jc_write_buf)) {
    > + if (signal_pending(current))
    > + break;
    > + if (time_after(jiffies, expire))
    > + break;

    Maybe some sort of sleep here?

    > + }
    > +}

    The tty handling is weird. You should take a reference before accessing
    the structure.


    \
     
     \ /
      Last update: 2009-06-03 00:07    [W:0.041 / U:0.664 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site