From patchwork Thu Oct 30 19:59:46 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 6779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6C01CDDD04 for ; Sat, 1 Nov 2008 20:22:48 +1100 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1KwCfi-0001IJ-GP; Sat, 01 Nov 2008 09:21:30 +0000 Received: from smtp.gentoo.org ([140.211.166.183]) by bombadil.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id 1KvdgP-0003b7-8w for linux-mtd@lists.infradead.org; Thu, 30 Oct 2008 19:59:53 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 9796464668; Thu, 30 Oct 2008 19:59:46 +0000 (UTC) From: Mike Frysinger To: David Woodhouse , Chen Gong Subject: [PATCH] m25p80: fix detection of m25p16 flashes Date: Thu, 30 Oct 2008 15:59:46 -0400 Message-Id: <1225396786-23679-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1225286467-17955-1-git-send-email-vapier@gentoo.org> References: <1225286467-17955-1-git-send-email-vapier@gentoo.org> X-Bad-Reply: References and In-Reply-To but no 'Re:' in Subject. X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Sat, 01 Nov 2008 05:21:28 -0400 Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Michael Hennerich X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Commit d0e8c47c58575b9131e786edb488fd029eba443e added support for extended ids but seems to break on flashes which don't have an extended id defined. If the table does not have an extid defined, then we should ignore it. Signed-off-by: Mike Frysinger Signed-off-by: Michael Hennerich --- drivers/mtd/devices/m25p80.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index a298fed..6188fd4 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -575,7 +575,7 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi) tmp < ARRAY_SIZE(m25p_data); tmp++, info++) { if (info->jedec_id == jedec) { - if (ext_jedec != 0 && info->ext_id != ext_jedec) + if (info->ext_id != 0 && info->ext_id != ext_jedec) continue; return info; }