* [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers
@ 2009-10-31 23:13 Németh Márton
2009-11-01 8:52 ` Jean-Francois Moine
0 siblings, 1 reply; 3+ messages in thread
From: Németh Márton @ 2009-10-31 23:13 UTC (permalink / raw)
To: Jean-Francois Moine, Hans de Goede, V4L Mailing List
Cc: Thomas Kaiser, Theodore Kilgore, Kyle Guinn
Hi,
the following patchset refactores the Pixart PAC7311 subdriver. The
current situation is that the code contains a lot of decisions
like this:
if (sd->sensor == SENSOR_PAC7302) {
... do this ...
} else {
... do something else ...
}
The sensor type is determined using the USB Vendor ID and Product
ID which means that the decisions shown are not really necessary.
The goal of the patchset is to have a PAC7302 and a PAC7311 subdriver
which have the benefit that there is no decision necessary on sensor
type at runtime. The common functions can be extracted later but this
would be a different patchset.
Regards,
Márton Németh
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers
2009-10-31 23:13 [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers Németh Márton
@ 2009-11-01 8:52 ` Jean-Francois Moine
2009-11-01 21:59 ` Németh Márton
0 siblings, 1 reply; 3+ messages in thread
From: Jean-Francois Moine @ 2009-11-01 8:52 UTC (permalink / raw)
To: Németh Márton
Cc: Hans de Goede, V4L Mailing List, Thomas Kaiser, Theodore Kilgore,
Kyle Guinn
On Sun, 01 Nov 2009 00:13:10 +0100
Németh Márton <nm127@freemail.hu> wrote:
> the following patchset refactores the Pixart PAC7311 subdriver. The
> current situation is that the code contains a lot of decisions
> like this:
>
> if (sd->sensor == SENSOR_PAC7302) {
> ... do this ...
> } else {
> ... do something else ...
> }
>
> The sensor type is determined using the USB Vendor ID and Product
> ID which means that the decisions shown are not really necessary.
>
> The goal of the patchset is to have a PAC7302 and a PAC7311 subdriver
> which have the benefit that there is no decision necessary on sensor
> type at runtime. The common functions can be extracted later but this
> would be a different patchset.
Hello Márton,
Splitting the pac7311 subdriver is a good idea, but I don't like your
patchset: a lot of changes (function prefixes) are nullified by the
last patch. I'd better like only one change for the pac7302 creation
and a second one for the interface change of pac_find_sof() in
pac_common.h (BTW, this file could now be compiled separately).
Regards.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers
2009-11-01 8:52 ` Jean-Francois Moine
@ 2009-11-01 21:59 ` Németh Márton
0 siblings, 0 replies; 3+ messages in thread
From: Németh Márton @ 2009-11-01 21:59 UTC (permalink / raw)
To: Jean-Francois Moine
Cc: Hans de Goede, V4L Mailing List, Thomas Kaiser, Theodore Kilgore,
Kyle Guinn
Jean-Francois Moine wrote:
> On Sun, 01 Nov 2009 00:13:10 +0100
> Németh Márton <nm127@freemail.hu> wrote:
>
>> the following patchset refactores the Pixart PAC7311 subdriver. The
>> current situation is that the code contains a lot of decisions
>> like this:
>>
>> if (sd->sensor == SENSOR_PAC7302) {
>> ... do this ...
>> } else {
>> ... do something else ...
>> }
>>
>> The sensor type is determined using the USB Vendor ID and Product
>> ID which means that the decisions shown are not really necessary.
>>
>> The goal of the patchset is to have a PAC7302 and a PAC7311 subdriver
>> which have the benefit that there is no decision necessary on sensor
>> type at runtime. The common functions can be extracted later but this
>> would be a different patchset.
>
> Splitting the pac7311 subdriver is a good idea, but I don't like your
> patchset: a lot of changes (function prefixes) are nullified by the
> last patch. I'd better like only one change for the pac7302 creation
> and a second one for the interface change of pac_find_sof() in
> pac_common.h (BTW, this file could now be compiled separately).
Hello Jef,
thank you for the feedback, I'll try to send a patch set wich contains
bigger steps. I hope the separation will be not a too big step and won't
make it too difficult to bisect any possible problem I might introduce
with this change. But hope for the best and imagine the easy way when
no regression was introduced.
I am also thinking about finding the common functions which can be
compiled separately either in a helper module or to gspca_main maybe.
But first I focus on the pac7302/pac7311 separation.
Márton Németh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-01 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-31 23:13 [PATCH 00/21] gspca pac7302/pac7311: separate the two drivers Németh Márton
2009-11-01 8:52 ` Jean-Francois Moine
2009-11-01 21:59 ` Németh Márton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox