Re: Question about printking

2013-02-04 Thread Ezequiel Garcia
Hi Joe, On Sat, Feb 2, 2013 at 4:43 PM, Joe Perches wrote: > On Sat, 2013-02-02 at 16:30 -0300, Ezequiel Garcia wrote: >> ptr = kmalloc(sizeof(foo)); >> if (!ptr) { >> pr_err("Cannot allocate memory for foo\n"); >> return -ENOMEM; >>

Re: [PATCH 2/4] staging: media: go7007: firmware protection Protection for unfirmware load

2013-01-16 Thread Ezequiel Garcia
mall patches, but I'm sure you can do better than that! -- Ezequiel ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Re: [PATCH] staging: media: cxd2099: remove memcpy of similar structure variables

2012-08-06 Thread Ezequiel Garcia
On Mon, Aug 6, 2012 at 2:28 AM, Devendra Naga wrote: > Hi Ezequiel, > > On Mon, Aug 6, 2012 at 3:36 AM, Ezequiel Garcia wrote: >> Hi Devendra, >> >> Thanks for the patch, >> >> On Sun, Aug 5, 2012 at 5:40 PM, Devendra Naga >> wrote: >>>

Re: [PATCH] staging: media: cxd2099: remove memcpy of similar structure variables

2012-08-05 Thread Ezequiel Garcia
Hi Devendra, Thanks for the patch, On Sun, Aug 5, 2012 at 5:40 PM, Devendra Naga wrote: > structure variables can be assigned, no memcpy needed, > remove the memcpy and use assignment for the cfg and en variables. > > Tested by Compilation Only > > Suggested-by: Ezequiel Gar

Re: [PATCH] staging: wlags49_h2: Replace kmalloc+memset by kzalloc and add error handling.

2012-03-27 Thread Ezequiel García
Hi, On Fri, Mar 23, 2012 at 12:41 PM, Greg KH wrote: > > And I bet they are used wrong there.  Again, unless you are in some very > performance critical section of code, don't use unlikely(). > > The big thing is that it just is not needed at all.  Don't try to be > smarter than the compiler if y

Re: A second easycap driver implementation

2012-03-19 Thread Ezequiel García
t;v4l2_dev, &dev->i2c_adap, "saa7115_auto", 0, saa711x_addrs); in a workqueue, (in the same way modules are loaded in workqueues)? I think not, since we won't call i2c directly, but rather through v4l2_device_call_all(), right? Thanks, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Q] tracing/printing

2012-03-14 Thread Ezequiel García
Hi, I'm writing a video capture device and have a doubt about how to correctly print to screen. First, I suppose I should follow the rule "don't print unless there is something surprising to say", right? Second, I've found I need to print in a very verbose manner at developing stage so I should i

Re: A second easycap driver implementation

2012-03-07 Thread Ezequiel García
; >        SET(p, 0x200, 0x01); >        return wait_i2c(p); > } I think i2c_address it is near registers 0x200/0x204, which gets initialised at setup_stk(). I'll have a closer look. Thanks for your comments, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Re: A second easycap driver implementation

2012-03-07 Thread Ezequiel García
k at the em28xx driver and also at the saa711x to see how would it be possible to add support for this device. Perhaps, we'll end up with a separate driver but based on some common code. Thanks, Ezequiel. ___ devel mailing list devel@linuxdriverprojec

Re: A second easycap driver implementation

2012-03-07 Thread Ezequiel García
e the wants to help I can send what I have now or we can start working through github. If someone owns this device, it would be a *huge* help with testing. However, as soon as this is capturing video I would like to put it on staging, so everyone can help. Is this po

A second easycap driver implementation

2012-03-06 Thread Ezequiel García
t does all v4l2 and videobuf2 intialization but it doesn't actually stream video or submit urbs. So, 1. Should I try to have something more finished before submit or can I submit as it is? 2. In any case, how should I submit it? (Considering there is already a working driver). T

A second easycap driver implementation

2012-03-06 Thread Ezequiel García
t does all v4l2 and videobuf2 intialization but it doesn't actually stream video or submit urbs. So, 1. Should I try to have something more finished before submit or can I submit as it is? 2. In any case, how should I submit it? (Considering there is already a working driver). T

Re: [question] v4l read() operation

2012-02-27 Thread Ezequiel García
EINVAL (Invalid argument) This is clearly shown by the piece of code mentioned before. Thanks and sorry for the noise, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[question] v4l read() operation

2012-02-25 Thread Ezequiel García
>fops->read(filp, buf, sz, off); if (vdev->lock) mutex_unlock(vdev->lock); return ret; } Thanks, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[question] between probe() and open()

2012-02-25 Thread Ezequiel García
usb_probe() time modprobe easycap real0m0.003s user0m0.000s sys 0m0.002s Thanks, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Re: [PATCH 5/9] staging: easycap: Push video registration to easycap_register_video()

2012-02-24 Thread Ezequiel García
Hi Dan, On Fri, Feb 24, 2012 at 3:39 PM, Dan Carpenter wrote: > On Fri, Feb 24, 2012 at 12:24:18PM -0300, Ezequiel Garcia wrote: >> +             rc = easycap_register_video(peasycap); >> +             if (rc < 0) >>                       return -ENODEV; > > Don&

[PATCH 7/9] staging: easycap: Clean comment style in easycap_usb_disconnect()

2012-02-24 Thread Ezequiel Garcia
Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 64 ++ 1 files changed, 24 insertions(+), 40 deletions(-) diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 6e1734d..de53ed8

[PATCH 8/9] staging: easycap: Clean comment style in easycap_delete()

2012-02-24 Thread Ezequiel Garcia
Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 43 + 1 files changed, 16 insertions(+), 27 deletions(-) diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index de53ed8..76a2c5b

[PATCH 9/9] staging: easycap: Split easycap_delete() into several pieces

2012-02-24 Thread Ezequiel Garcia
The patch splits easycap_delete(), which is in charge of buffer deallocation, into smaller functions each deallocating a specific kind of buffer. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 445 ++--- 1 files changed, 249 insertions

[PATCH 6/9] staging: easycap: Split audio buffer and urb allocation

2012-02-24 Thread Ezequiel Garcia
When the device is probed, this driver allocates audio buffers, and audio urbs. This patch just split this into separate functions, which helps clearing the currently gigantic probe function. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 229

[PATCH 4/9] staging: easycap: Initialize 'ntsc' parameter before usage

2012-02-24 Thread Ezequiel Garcia
This parameter is now initialized at init_easycap(), this way we assure it won't be used uninitialized. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/ea

[PATCH 5/9] staging: easycap: Push video registration to easycap_register_video()

2012-02-24 Thread Ezequiel Garcia
Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 58 +++--- 1 files changed, 33 insertions(+), 25 deletions(-) diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 480164d..68af1a2

[PATCH 3/9] staging: easycap: Push bInterfaceNumber saving to config_easycap()

2012-02-24 Thread Ezequiel Garcia
Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 72 +++--- 1 files changed, 41 insertions(+), 31 deletions(-) diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 6d7cdef..9d6dc09

[PATCH 2/9] staging: easycap: Split buffer and video urb allocation

2012-02-24 Thread Ezequiel Garcia
When the device is probed, this driver allocates frame buffers, field buffers, isoc buffers and urbs. This patch just split this into separate functions, which helps clearing the currently gigantic probe function. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c

[PATCH 1/9] staging: easycap: Split device struct alloc and retrieval code

2012-02-24 Thread Ezequiel Garcia
When the device is probed a driver struct is either allocated or retrieved. This operation is logically splitted in several functions. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 384 +++--- 1 files changed, 216 insertions(+), 168

[PATCH V2 2/2] staging: easycap: Fix incorrect comment

2012-02-22 Thread Ezequiel Garcia
Signed-off-by: Ezequiel Garcia --- V2: resend to proper maintainers drivers/staging/media/easycap/easycap_main.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index

[PATCH V2 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-22 Thread Ezequiel Garcia
Some of these comments may still need to be reviewed. This patch only cleans the comment style. Signed-off-by: Ezequiel Garcia --- V2: Fix comment style and resend patch to proper maintainers. drivers/staging/media/easycap/easycap_main.c | 243 +- 1 files changed, 79

Re: [PATCH 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-20 Thread Ezequiel García
he style and splitting functions is helping me a lot understand the code. So that's what I'm working on right now. I'm still unsure whether these patches help the maintainers in any way, but I didn't want to keep on working locally and take my

Re: [PATCH 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-20 Thread Ezequiel García
2012/2/20 Tomas Winkler : > Best if you run  ./scripts/get_maintainer.pl on your patch files to > get list of relevant addresses. > Ok, I'll do that. Thanks, Ezequiel. ___ devel mailing list devel@linuxdriverpr

Re: [PATCH 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-20 Thread Ezequiel García
#x27;s ok by me.  I just wanted to explain how multi-line > comments are supposed to look so you get it right in later patches. > I'll resend the patch as v2. What I meant to ask was: I want to keep working on this driver, doing more fixes. C

Re: [PATCH 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-19 Thread Ezequiel García
;s wrong and I'll be glad to fix it :) > If you want send a email to me as a reply to the thread, > and I'll reply acking your current patch. What do you mean with this? Thanks for your help, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Re: [PATCH 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-19 Thread Ezequiel García
es 1 and 2 are probed. >> +     */ >        ^ > Could you make this asterisk line up with the others? Of course. If I send more patches about easycap driver, can I base it on my current local branch? I mean, based on all these patches? Thanks, Ezequiel. ___

Re: [PATCH] Staging: driver usbip: Code cleanup

2012-02-19 Thread Ezequiel García
n Greg's excellent FOSDEM talk. http://www.youtube.com/watch?v=LLBrBBImJt4 It can be configured to set "Signed-off-by", "author", etc automatically. Good luck, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http:/

[PATCH 2/2] staging: easycap: Fix incorrect comment

2012-02-18 Thread Ezequiel Garcia
Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/easycap/easycap_main.c b/drivers/staging/media/easycap/easycap_main.c index 70ebaae..9f9c287 100644 --- a/drivers

[PATCH 1/2] staging: easycap: Clean comment style in easycap_usb_probe()

2012-02-18 Thread Ezequiel Garcia
Some of these comments may still need to be reviewed. This patch only cleans the comment style. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/easycap/easycap_main.c | 236 -- 1 files changed, 71 insertions(+), 165 deletions(-) diff --git a/drivers/staging

Re: [QUESTION] staging/easycap fix

2012-02-14 Thread Ezequiel García
ode reference? Can you give me further reference? I can think on nothing except reading driver code itself and keep LDD3 and Love's book near. Thanks, Ezequiel. ___ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Re: Remove ugly comments from staging easycap

2011-11-16 Thread Ezequiel García
2011/11/16 Winkler, Tomas : > >> On Tue, Nov 15, 2011 at 04:35:14PM -0300, Ezequiel wrote: >> > I was wondering... >> > Wouldn't it be desirable to remove the ugly comment style from staging >> > easycap driver? >> > >> >> Yes.  Pl

Cleanup proposal for media/gspca

2011-11-15 Thread Ezequiel
gspca_dev *gspca_dev; + struct video_device *vdev; PDEBUG(D_STREAM, "[%s] open", current->comm); - gspca_dev = (struct gspca_dev *) video_devdata(file); + vdev = video_devdata(file); + gspca_dev = video_get_drvdata(vdev); if (!gspca_dev->

Remove ugly comments from staging easycap

2011-11-15 Thread Ezequiel
I was wondering... Wouldn't it be desirable to remove the ugly comment style from staging easycap driver? That way we can continue the fixing and cleaning of the driver, but it will look nicer and easier to read. Ezequiel. ___ devel mailing list

[staging-next v2] staging: easycap: remove easycap_open_noinode function

2011-11-15 Thread Ezequiel
Remove useless easycap_open_noinode() function, and replace it with easycap_open(). Signed-off-by: Ezequiel Garcia --- Based on 11th patch set (09 Nov) by Tomas Winkler. Changes from v1: This same comment was part of the commit message. --- --- a/drivers/staging/media/easycap/easycap_main.c

[staging-next] staging: easycap: remove easycap_open_noinode function

2011-11-14 Thread Ezequiel
Based on 11th patch set (09 Nov) by Tomas Winkler. Remove useless easycap_open_noinode() function, and replace it with easycap_open(). Signed-off-by: Ezequiel Garcia --- --- a/drivers/staging/media/easycap/easycap_main.c 2011-11-14 14:05:23.0 -0300 +++ b/drivers/staging/media

Re: [staging-media-next 10/11] easycap: drop usb_class_driver

2011-11-10 Thread Ezequiel
t; ___ If you have dropped file_operations then easycap_open_noinode is completely useless, you can just change easycap_open to receive just struct file*. I would send a patch, but I don't know if I have to base it on this patc

Re: Staging: Easycap DC60 driver: Getting started

2011-11-08 Thread Ezequiel García
El 8 de noviembre de 2011 13:56, Greg KH escribió: > > On Tue, Nov 08, 2011 at 01:50:40PM -0300, Ezequiel García wrote: > > Hi, > > I would like to start working in the staging easycap driver. I have one of > > those devices, so I will be able to do some testing. &g