Re: [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Will do.

Regards,
Andy



Hans de Goede <hdegoede@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxx>
>>
>> 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@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
��.n��������+%������w��{.n�����{��g����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux