public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kiril Jovchev <jovchev@gmail.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Subject: Re: [PATCH] Creative WebCam mini driver
Date: Fri, 3 Jun 2005 09:54:33 +0300	[thread overview]
Message-ID: <416f0858050602235455c6656@mail.gmail.com> (raw)
In-Reply-To: <200506022016.03112.adobriyan@gmail.com>

Thanks for the comments Alexey. 

The whitespaces came from the diff. I the only switch what I have used it -u.

About the VENDOR_ID and PRODUCT_ID, I have looked at the code of
stv680.c that was in 2.6.11.11 and there the variables were casted.
> @@ -1375,9 +1383,14 @@
>           (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
Probably this code needs to be fixed as well.

And about the extra lines and bad formating of else clause I'll do
better next time.

Do I need to submit fixed patch or you have applied this one?

//Cyrilo

On 6/2/05, Alexey Dobriyan <adobriyan@gmail.com> wrote:
> On Thursday 02 June 2005 19:35, Kiril Jovchev wrote:
> 
> > So now I'm sending the patch again for 2.6.11.11 kernel what is latest stable.
> 
> You're lucky it applies cleanly against 2.6.12-rc5-whatever. ;-)
> 
> There is no need to split the patch into two ones. Next time CC
> linux-usb-devel@lists.sourceforge.net. Add "-p" to your diff switches.
> 
> > --- linux-2.6.11.11/drivers/usb/media/stv680.c
> > +++ linux/drivers/usb/media/stv680.c
> 
> > + * Creative WebCam Go Mini Driver, modified by Kiril Jovchev
> 
> Trailing whitespace.
> 
> > + *
> > + * ver 0.26 Sep, 2004 (kjv)
> > + *                      Added support for Creative WebCam Go mini.
> > + *                      Camera is based on same chip.
> > + *
> 
> Trailing whitespace.
> 
> > @@ -1375,9 +1383,14 @@
> >           (le16_to_cpu(dev->descriptor.idProduct) == USB_PENCAM_PRODUCT_ID)) {
> >               camera_name = "STV0680";
> >               PDEBUG (0, "STV(i): STV0680 camera found.");
> > -     } else {
> > -             PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 values.");
> > -             PDEBUG (0, "STV(e): Check that the STV0680 camera is connected to the computer.");
> > +     } else if ((le16_to_cpu(dev->descriptor.idVendor) == USB_CREATIVEGOMINI_VENDOR_ID) &&
> > +            (le16_to_cpu(dev->descriptor.idProduct) == USB_CREATIVEGOMINI_PRODUCT_ID)) {
> 
> VENDOR_ID and PRODUCT_ID are constants. You can do
> 
>         if ((dev->descriptor.idVendor == cpu_to_le16(VENDOR_ID)) &&
>             (dev->descriptor.idProduct == cpu_to_le16(PRODUCT_ID))) {
> 
> > +                camera_name = "Creative WebCam Go Mini";
> > +                PDEBUG (0, "STV(i): Creative WebCam Go Mini found.");
> > +     }
> > +     else {
> 
> "} else {", please.
> 
> > +             PDEBUG (0, "STV(e): Vendor/Product ID do not match STV0680 or Creative WebCam Go Mini values.");
> > +             PDEBUG (0, "STV(e): Check that the STV0680 or Creative WebCam Go Mini camera is connected to the computer.");
> 
> > --- linux-2.6.11.11/drivers/usb/media/stv680.h
> > +++ linux/drivers/usb/media/stv680.h
> 
> > +#define USB_CREATIVEGOMINI_VENDOR_ID 0x041e
> 
> Trailing whitespace.
> 
> >  static struct usb_device_id device_table[] = {
> >       {USB_DEVICE (USB_PENCAM_VENDOR_ID, USB_PENCAM_PRODUCT_ID)},
> > +     {USB_DEVICE (USB_CREATIVEGOMINI_VENDOR_ID, USB_CREATIVEGOMINI_PRODUCT_ID)},
> >       {}
> > +
> 
> Why add this line?
> 
> >  };
>

      reply	other threads:[~2005-06-03  6:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 15:35 [PATCH] Creative WebCam mini driver Kiril Jovchev
2005-06-02 15:41 ` Duncan Sands
2005-06-02 16:16 ` Alexey Dobriyan
2005-06-03  6:54   ` Kiril Jovchev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=416f0858050602235455c6656@mail.gmail.com \
    --to=jovchev@gmail.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox