* [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume
@ 2010-09-12 1:51 Andy Walls
2010-09-12 7:28 ` Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Andy Walls @ 2010-09-12 1:51 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede, Jean-Francois Moine
gspca_cpia1: Restore QX3 illuminators' state on resume
Turn the lights of the QX3 on (or off) as needed when resuming and at module
load.
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
diff -r 32d5c323c541 -r c2e7fb2d768e linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c Sat Sep 11 21:15:03 2010 -0400
+++ b/linux/drivers/media/video/gspca/cpia1.c Sat Sep 11 21:32:35 2010 -0400
@@ -1772,6 +1772,10 @@
if (ret)
return ret;
+ /* Ensure the QX3 illuminators' states are restored upon resume */
+ if (sd->params.qx3.qx3_detected)
+ command_setlights(gspca_dev);
+
sd_stopN(gspca_dev);
if (!sd->params.qx3.qx3_detected)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume
2010-09-12 1:51 [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume Andy Walls
@ 2010-09-12 7:28 ` Hans de Goede
0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2010-09-12 7:28 UTC (permalink / raw)
To: Andy Walls; +Cc: linux-media, Jean-Francois Moine
Hi,
On 09/12/2010 03:51 AM, Andy Walls wrote:
> gspca_cpia1: Restore QX3 illuminators' state on resume
>
> Turn the lights of the QX3 on (or off) as needed when resuming and at module
> load.
>
> Signed-off-by: Andy Walls<awalls@md.metrocast.net>
>
> diff -r 32d5c323c541 -r c2e7fb2d768e linux/drivers/media/video/gspca/cpia1.c
> --- a/linux/drivers/media/video/gspca/cpia1.c Sat Sep 11 21:15:03 2010 -0400
> +++ b/linux/drivers/media/video/gspca/cpia1.c Sat Sep 11 21:32:35 2010 -0400
> @@ -1772,6 +1772,10 @@
> if (ret)
> return ret;
>
> + /* Ensure the QX3 illuminators' states are restored upon resume */
> + if (sd->params.qx3.qx3_detected)
> + command_setlights(gspca_dev);
> +
> sd_stopN(gspca_dev);
>
> if (!sd->params.qx3.qx3_detected)
Notice the:
if (sd->params.qx3.qx3_detected)
command_setlights(gspca_dev);
sd_stopN(gspca_dev);
if (!sd->params.qx3.qx3_detected)
....
Given that at least the order of execution of the second if statement
does not matter wrt to the sd_stopN(gspca_dev), can we please
make this:
if (sd->params.qx3.qx3_detected)
command_setlights(gspca_dev);
else
....
sd_stopN(gspca_dev);
Thanks,
Hans
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume
@ 2010-09-12 11:51 Andy Walls
0 siblings, 0 replies; 3+ messages in thread
From: Andy Walls @ 2010-09-12 11:51 UTC (permalink / raw)
To: Hans de Goede; +Cc: linux-media, Jean-Francois Moine
Will do.
Regards,
Andy
Hans de Goede <hdegoede@redhat.com> wrote:
>Hi,
>
>On 09/12/2010 03:51 AM, Andy Walls wrote:
>> gspca_cpia1: Restore QX3 illuminators' state on resume
>>
>> Turn the lights of the QX3 on (or off) as needed when resuming and at module
>> load.
>>
>> Signed-off-by: Andy Walls<awalls@md.metrocast.net>
>>
>> diff -r 32d5c323c541 -r c2e7fb2d768e linux/drivers/media/video/gspca/cpia1.c
>> --- a/linux/drivers/media/video/gspca/cpia1.c Sat Sep 11 21:15:03 2010 -0400
>> +++ b/linux/drivers/media/video/gspca/cpia1.c Sat Sep 11 21:32:35 2010 -0400
>> @@ -1772,6 +1772,10 @@
>> if (ret)
>> return ret;
>>
>> + /* Ensure the QX3 illuminators' states are restored upon resume */
>> + if (sd->params.qx3.qx3_detected)
>> + command_setlights(gspca_dev);
>> +
>> sd_stopN(gspca_dev);
>>
>> if (!sd->params.qx3.qx3_detected)
>
>
>Notice the:
>
> if (sd->params.qx3.qx3_detected)
> command_setlights(gspca_dev);
>
> sd_stopN(gspca_dev);
>
> if (!sd->params.qx3.qx3_detected)
> ....
>
>Given that at least the order of execution of the second if statement
>does not matter wrt to the sd_stopN(gspca_dev), can we please
>make this:
>
> if (sd->params.qx3.qx3_detected)
> command_setlights(gspca_dev);
> else
> ....
>
> sd_stopN(gspca_dev);
>
>Thanks,
>
>Hans
>--
>To unsubscribe from this list: send the line "unsubscribe linux-media" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-12 11:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-12 1:51 [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume Andy Walls
2010-09-12 7:28 ` Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2010-09-12 11:51 Andy Walls
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).