lkml.org 
[lkml]   [2011]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [USB]Add Samsung SGH-I500/Android modem ID switch to visor driver
Hello.

On 06-02-2011 23:04, Maciej Szmigiero wrote:

>>> New version of patch which autodetects devices with ACM class.
>>> Tested on Galaxy Spica.

>>> Signed-off-by: Maciej Szmigiero<mhej@o2.pl>

>>> diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
>>> index 15a5d89..e1c4527 100644
>>> --- a/drivers/usb/serial/visor.c
>>> +++ b/drivers/usb/serial/visor.c
>> [...]
>>> @@ -479,6 +480,15 @@ static int visor_probe(struct usb_serial *serial,
>>>
>>> dbg("%s", __func__);
>>>
>>> + /* some Samsung Android phones in modem mode have the same ID */
>>> + /* as SPH-I500, but they are ACM devices, so dont bind to them */

>> The preferred style for the multi-line comments is this:

>> /*
>> * bla
>> * bla
>> */

>>> + if ((id->idVendor == SAMSUNG_VENDOR_ID)&&
>>> + (id->idProduct == SAMSUNG_SPH_I500_ID)&&
>>> + (serial->dev->descriptor.bDeviceClass == USB_CLASS_COMM)&&
>>> + (serial->dev->descriptor.bDeviceSubClass ==
>>> + USB_CDC_SUBCLASS_ACM))
>>
>> Parens around == not necessary...

>> WBR, Sergei

> Thanks for comments, new version of this patch with style fixes follows.

> Best regards,
> Maciej Szmigiero

> Signed-off-by: Maciej Szmigiero<mhej@o2.pl>

> diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
> index 15a5d89..0f75948 100644
> --- a/drivers/usb/serial/visor.c
> +++ b/drivers/usb/serial/visor.c
[...]
> @@ -479,6 +480,17 @@ static int visor_probe(struct usb_serial *serial,
>
> dbg("%s", __func__);
>
> + /*
> + * some Samsung Android phones in modem mode have the same ID
> + * as SPH-I500, but they are ACM devices, so dont bind to them
> + */

Space is missing. You were close. :-)

WBR, Sergei


\
 
 \ /
  Last update: 2011-02-07 12:29    [W:0.058 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site