From patchwork Sat Feb 20 12:58:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LECERF X-Patchwork-Id: 45921 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.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 48BCAB7CC2 for ; Sat, 20 Feb 2010 23:59:17 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NiotC-0004mL-Ny; Sat, 20 Feb 2010 12:56:54 +0000 Received: from smtp6-g21.free.fr ([212.27.42.6]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Niot6-0004Pg-5G for linux-mtd@lists.infradead.org; Sat, 20 Feb 2010 12:56:53 +0000 Received: from smtp6-g21.free.fr (localhost [127.0.0.1]) by smtp6-g21.free.fr (Postfix) with ESMTP id AFECEE0803C; Sat, 20 Feb 2010 13:56:44 +0100 (CET) Received: from shiryu.yomgui.biz (lsd.homeftp.net [82.235.75.105]) by smtp6-g21.free.fr (Postfix) with ESMTP id CEFD2E08056; Sat, 20 Feb 2010 13:56:41 +0100 (CET) Received: from localhost ([127.0.0.1] helo=shiryu.yomgui.biz ident=fox) by shiryu.yomgui.biz with esmtp (Exim 4.71) (envelope-from ) id 1NiouP-0003yb-V0; Sat, 20 Feb 2010 13:58:09 +0100 Subject: [PATCH 5/6] mtd: cfi_probe: use P_ID_* definitions instead of hardcoded values To: David Woodhouse From: Guillaume LECERF Date: Sat, 20 Feb 2010 13:58:09 +0100 Message-ID: <20100220125809.14843.16798.stgit@shiryu.yomgui.biz> In-Reply-To: <20100220125748.14843.70415.stgit@shiryu.yomgui.biz> References: <20100220125748.14843.70415.stgit@shiryu.yomgui.biz> User-Agent: StGit/0.15 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100220_075648_826898_08A119FE X-CRM114-Status: UNSURE ( 6.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ Cc: linux-mtd X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use P_ID_* definitions already in include/linux/mtd/cfi.h instead of the hardcoded values. Make the code more readable. Signed-off-by: Guillaume Lecerf --- drivers/mtd/chips/gen_probe.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c index e2dc964..991c457 100644 --- a/drivers/mtd/chips/gen_probe.c +++ b/drivers/mtd/chips/gen_probe.c @@ -242,17 +242,17 @@ static struct mtd_info *check_cmd_set(struct map_info *map, int primary) /* We need these for the !CONFIG_MODULES case, because symbol_get() doesn't work there */ #ifdef CONFIG_MTD_CFI_INTELEXT - case 0x0001: - case 0x0003: - case 0x0200: + case P_ID_INTEL_EXT: + case P_ID_INTEL_STD: + case P_ID_INTEL_PERFORMANCE: return cfi_cmdset_0001(map, primary); #endif #ifdef CONFIG_MTD_CFI_AMDSTD - case 0x0002: + case P_ID_AMD_STD: return cfi_cmdset_0002(map, primary); #endif #ifdef CONFIG_MTD_CFI_STAA - case 0x0020: + case P_ID_ST_ADV: return cfi_cmdset_0020(map, primary); #endif default: