All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Andy Walls <awalls@md.metrocast.net>
Cc: linux-media@vger.kernel.org, Jean-Francois Moine <moinejf@free.fr>
Subject: Re: [PATCH 3/3] gspca_cpia1: Restore QX3 illuminators' state on resume
Date: Sun, 12 Sep 2010 09:28:39 +0200	[thread overview]
Message-ID: <4C8C8127.9000707@redhat.com> (raw)
In-Reply-To: <1284256281.2030.20.camel@morgan.silverblock.net>

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

  reply	other threads:[~2010-09-12  7:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-09-12 11:51 Andy Walls

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C8C8127.9000707@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=awalls@md.metrocast.net \
    --cc=linux-media@vger.kernel.org \
    --cc=moinejf@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.