public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Philip Avinash <avinashphilip@ti.com>
Cc: khilman@ti.com, afzal@ti.com, tony@atomide.com,
	artem.bityutskiy@linux.intel.com, nsekhar@ti.com,
	linux-kernel@vger.kernel.org, hvaibhav@ti.com,
	gururaja.hebbar@ti.com, linux-mtd@lists.infradead.org,
	linux-omap@vger.kernel.org, dwmw2@infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/4] mtd: devices: elm: Low power transition support
Date: Sat, 9 Feb 2013 10:22:44 +0000	[thread overview]
Message-ID: <20130209102243.GH17852@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1360240618-11094-4-git-send-email-avinashphilip@ti.com>

On Thu, Feb 07, 2013 at 06:06:57PM +0530, Philip Avinash wrote:
> +static int elm_suspend(struct device *dev)
> +{
> +	struct elm_info *info = dev_get_drvdata(dev);
> +	wait_queue_head_t wq;
> +	DECLARE_WAITQUEUE(wait, current);
> +
> +	init_waitqueue_head(&wq);
> +	while (1) {
> +		/* Make sure that ELM not running */
> +		if (info->idle) {
> +			add_wait_queue(&wq, &wait);
> +			schedule();
> +			remove_wait_queue(&wq, &wait);
> +		} else {
> +			break;
> +		}
> +	}

The above code looks really wrong - it will just spin endlessly with the
waitqueues doing nothing useful.  What are you trying to do here?

  reply	other threads:[~2013-02-09 10:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 12:36 [PATCH v2 0/4] suspend/resume support for OMAP nand driver Philip Avinash
2013-02-07 12:36 ` [PATCH v2 1/4] arm: gpmc: Converts GPMC driver to pm_runtime capable Philip Avinash
2013-02-07 12:36 ` [PATCH v2 2/4] arm: gpmc: Low power transition support Philip Avinash
2013-02-07 12:36 ` [PATCH v2 3/4] mtd: devices: elm: " Philip Avinash
2013-02-09 10:22   ` Russell King - ARM Linux [this message]
2013-02-13 11:42     ` Philip, Avinash
2013-02-13 12:43       ` Russell King - ARM Linux
2013-02-19 12:48         ` Philip, Avinash
2013-02-07 12:36 ` [PATCH v2 4/4] mtd: nand: omap2: " Philip Avinash

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=20130209102243.GH17852@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=afzal@ti.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=avinashphilip@ti.com \
    --cc=dwmw2@infradead.org \
    --cc=gururaja.hebbar@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=tony@atomide.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox