All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan McDowell <noodles@earth.li>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] Fix checking for multiple boot tags in board config.
Date: Fri, 7 Apr 2006 16:00:28 +0100	[thread overview]
Message-ID: <20060407150028.GT22929@earth.li> (raw)

Currently if we look for more than one instance of a boot tag and it's
defined in the board config rather than passed by the boot loader we can
get stuck in a loop where the same tag is processed many times. This can
be seen with the gpio-switch driver, for example. The patch below fixes
this by respecting the skip parameter to get_config when we're scanning
the board config structure.

Signed-Off-By: Jonathan McDowell <noodles@earth.li>

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index 0625df5..39ab667 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -114,8 +114,12 @@ static const void *get_config(u16 tag, s
 	 * in the kernel. */
 	for (i = 0; i < omap_board_config_size; i++) {
 		if (omap_board_config[i].tag == tag) {
-			kinfo = &omap_board_config[i];
-			break;
+			if (skip == 0) {
+				kinfo = &omap_board_config[i];
+				break;
+			} else {
+				skip--;
+			}
 		}
 	}
 	if (kinfo == NULL)

             reply	other threads:[~2006-04-07 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 15:00 Jonathan McDowell [this message]
2006-04-07 15:50 ` [PATCH] Fix checking for multiple boot tags in board config Imre Deak
2006-04-07 15:58   ` Jonathan McDowell
2006-04-08  7:58     ` Imre Deak
2006-05-15  9:44       ` Tony Lindgren

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=20060407150028.GT22929@earth.li \
    --to=noodles@earth.li \
    --cc=linux-omap-open-source@linux.omap.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 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.