lkml.org 
[lkml]   [2002]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [linux-usb-devel] [PATCH] KB Gear JamStudio USB Tablet
    On Fri, Oct 25, 2002 at 02:04:25AM -0500, Josh Myer wrote:
    > +static void kbtab_irq(struct urb *urb)
    > +{
    > +
    > + struct kbtab *tab = urb->context;
    > + unsigned char *data = tab->data;
    > + struct input_dev *dev = &tab->dev;
    > +
    > + if(urb->status)
    > + return;

    Please use tabs instead of spaces. Documentation/CodingStyle has these
    rules if you haven't read it yet.

    > + FILL_INT_URB(&kbtab->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
    > + kbtab->data, 8, kbtab_irq, kbtab, endpoint->bInterval);

    Please use usb_fill_int_urb() for all new code, and don't use the
    "old-style" macros.

    > +static struct usb_driver kbtab_driver = {
    > + name: "kbtab",
    > + probe: kbtab_probe,
    > + disconnect: kbtab_disconnect,
    > + id_table: kbtab_ids,
    > +};

    C99 style initializers are a good idea:

    > +static struct usb_driver kbtab_driver = {
    > + .name = "kbtab",
    > + .probe = kbtab_probe,
    > + .disconnect = kbtab_disconnect,
    > + .id_table = kbtab_ids,
    > +};

    Other than those minor things, looks good.

    thanks,

    greg k-h
    -
    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: 2005-03-22 13:30    [W:0.042 / U:1.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site