From patchwork Fri Oct 14 14:33:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andres Salomon X-Patchwork-Id: 119803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C3AD1B6F95 for ; Sat, 15 Oct 2011 01:34:30 +1100 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1REiq6-0000Vy-DP; Fri, 14 Oct 2011 14:34:22 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1REiq6-0006Ao-4j; Fri, 14 Oct 2011 14:34:22 +0000 Received: from lunge.queued.net ([173.255.254.236]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1REiq2-0006AV-Ui for linux-mtd@lists.infradead.org; Fri, 14 Oct 2011 14:34:19 +0000 Received: from localhost (c-67-160-86-206.hsd1.wa.comcast.net [67.160.86.206]) by lunge.queued.net (Postfix) with ESMTPSA id 8665128583C; Fri, 14 Oct 2011 07:34:17 -0700 (PDT) Date: Fri, 14 Oct 2011 07:33:20 -0700 From: Andres Salomon To: David Woodhouse Subject: [PATCH v2] mtd: provide an alias for the redboot module name Message-ID: <20111014073320.140fb4b2@debxo> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20111014_103419_089009_22F45D07 X-CRM114-Status: GOOD ( 12.42 ) X-Spam-Score: -0.5 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Artem Bityutskiy 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 parse_mtd_partitions takes a list of partition types; if the driver isn't loaded, it attempts to load it, and then it grabs the partition parser. For redboot, the module name is "redboot.ko", while the parser name is "RedBoot". Since modprobe is case-sensitive, attempting to modprobe "RedBoot" will never work. I suspect the embedded systems that make use of redboot just always manually loaded redboot prior to loading their specific nand chip drivers (or statically compiled it in). Signed-off-by: Andres Salomon Cc: stable@kernel.org --- drivers/mtd/redboot.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) v2: instead of renaming the module, use a module_alias. Duh. Thanks, Artem Bityutskiy! diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c index 7a87d07..4938bd0 100644 --- a/drivers/mtd/redboot.c +++ b/drivers/mtd/redboot.c @@ -297,6 +297,9 @@ static struct mtd_part_parser redboot_parser = { .name = "RedBoot", }; +/* mtd parsers will request the module by parser name */ +MODULE_ALIAS("RedBoot"); + static int __init redboot_parser_init(void) { return register_mtd_parser(&redboot_parser);