* [patch review] gspca - mr97310a: return error instead of -1 in sd_mod_init
@ 2009-03-27 16:08 Alexey Klimov
2009-03-27 19:01 ` Jean-Francois Moine
0 siblings, 1 reply; 3+ messages in thread
From: Alexey Klimov @ 2009-03-27 16:08 UTC (permalink / raw)
To: Jean-Francois Moine; +Cc: linux-media
Hello, Jean-Francois
What do you think about such small cleanup ?
---
Patch reformats sd_mod_init in the way to make it return error code from
usb_register instead of -1.
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
--
diff -r 56cf0f1772f7 linux/drivers/media/video/gspca/mr97310a.c
--- a/linux/drivers/media/video/gspca/mr97310a.c Mon Mar 23 19:18:34 2009 -0300
+++ b/linux/drivers/media/video/gspca/mr97310a.c Fri Mar 27 01:42:28 2009 +0300
@@ -347,8 +347,10 @@
/* -- module insert / remove -- */
static int __init sd_mod_init(void)
{
- if (usb_register(&sd_driver) < 0)
- return -1;
+ int ret;
+ ret = usb_register(&sd_driver);
+ if (ret < 0)
+ return ret;
PDEBUG(D_PROBE, "registered");
return 0;
}
--
Best regards, Klimov Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch review] gspca - mr97310a: return error instead of -1 in sd_mod_init
2009-03-27 16:08 [patch review] gspca - mr97310a: return error instead of -1 in sd_mod_init Alexey Klimov
@ 2009-03-27 19:01 ` Jean-Francois Moine
2009-03-28 20:08 ` A question about Documentation/video4linux/gspca.txt Theodore Kilgore
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Francois Moine @ 2009-03-27 19:01 UTC (permalink / raw)
To: Alexey Klimov; +Cc: linux-media
On Fri, 27 Mar 2009 19:08:22 +0300
Alexey Klimov <klimov.linux@gmail.com> wrote:
> Hello, Jean-Francois
>
> What do you think about such small cleanup ?
>
> ---
> Patch reformats sd_mod_init in the way to make it return error code
> from usb_register instead of -1.
>
> Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
[snip]
Applied. Thanks.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply [flat|nested] 3+ messages in thread
* A question about Documentation/video4linux/gspca.txt
2009-03-27 19:01 ` Jean-Francois Moine
@ 2009-03-28 20:08 ` Theodore Kilgore
0 siblings, 0 replies; 3+ messages in thread
From: Theodore Kilgore @ 2009-03-28 20:08 UTC (permalink / raw)
To: Jean-Francois Moine; +Cc: linux-media
I notice that sq905.c and sq905c.c have now been added to the gspca tree.
But now a question about the documentation. None of that has been
addressed, as yet, neither for the sq905 nor for the sq905c cameras. The
code has been added to the tree, but the accompanying documentation
is, as yet, missing. I would be glad to provide it, but it seems to me
that a policy question comes up, about just what to add. There are lots of
cameras.
Here is the problem:
The sq905 module supports, as far as I know, the entire list of cameras
which are supported by libgphoto2/camlibs/sq905, and probably more which I
did not list there because I got tired of adding yet another camera when,
in fact, functionally they were all pretty much equivalent (My bad. I
know that I missed a few of them, but I was more inexperienced back
then). In any event, the support for 24 cameras is explicitly listed
there.
The sq905c module supports, as far as I know, the entire list of cameras
which are supported by libgphoto2/camlibs/digigr8. The support for 16
cameras (or 17, if the line in libgphoto2/camlibs/digigr8/library.c
"Sakar 28290 and 28292 Digital Concepts Styleshot"
which refers to two cameras differing only in the color of the case
is counted as referring to two cameras).
Thus, if the documentation would be provided in
linux/Documentation/video4linux/gspca.txt it would amount to a total of 41
new entries, for these two new modules alone. Should all 41 of them be
added? I would think that they all ought to be listed somewhere, but
should the somewhere be there, or somewhere else? That is the question.
One possibility might be to refer the curious reader to the existing list
in the relevant file in libgphoto2, for example, since these are all
dual-mode cameras. If that were done, then it would be only needed to put
the USB Vendor:Product number into the gspca.txt file, along with a
pointer to the full information.
Theodore Kilgore
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-28 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 16:08 [patch review] gspca - mr97310a: return error instead of -1 in sd_mod_init Alexey Klimov
2009-03-27 19:01 ` Jean-Francois Moine
2009-03-28 20:08 ` A question about Documentation/video4linux/gspca.txt Theodore Kilgore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox