From patchwork Thu Jan 24 16:39:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 215443 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 E7DEF2C00A9 for ; Fri, 25 Jan 2013 03:41:45 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyPqy-00061s-KV; Thu, 24 Jan 2013 16:40:40 +0000 Received: from hauke-2-pt.tunnel.tserv6.fra1.ipv6.he.net ([2001:470:1f0a:465::2] helo=hauke-m.de) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyPqe-0005to-Vo for linux-mtd@lists.infradead.org; Thu, 24 Jan 2013 16:40:22 +0000 Received: from localhost (localhost [127.0.0.1]) by hauke-m.de (Postfix) with ESMTP id 6E2468F63; Thu, 24 Jan 2013 17:40:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at hauke-m.de Received: from hauke-m.de ([127.0.0.1]) by localhost (hauke-m.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dmauxB-ElwkG; Thu, 24 Jan 2013 17:40:13 +0100 (CET) Received: from hauke-desktop.lan (spit-414.wohnheim.uni-bremen.de [134.102.133.158]) by hauke-m.de (Postfix) with ESMTPSA id 674278F6A; Thu, 24 Jan 2013 17:40:04 +0100 (CET) From: Hauke Mehrtens To: dwmw2@infradead.org Subject: [PATCH 4/6] mtd: bcm47xxnflash: register this as normal driver Date: Thu, 24 Jan 2013 17:39:57 +0100 Message-Id: <1359045599-1305-5-git-send-email-hauke@hauke-m.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359045599-1305-1-git-send-email-hauke@hauke-m.de> References: <1359045599-1305-1-git-send-email-hauke@hauke-m.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130124_114021_247287_17484F34 X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Hauke Mehrtens , zajec5@gmail.com, linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 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 When platform_driver_probe() is used and no device is registered for this driver -ENODEV is returned and and error message is shown. Not all BCM47xx SoC have a nand flash chip controller and chip and for them an error message was shown. Signed-off-by: Hauke Mehrtens --- drivers/mtd/nand/bcm47xxnflash/main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/bcm47xxnflash/main.c index 616b56a..f674979 100644 --- a/drivers/mtd/nand/bcm47xxnflash/main.c +++ b/drivers/mtd/nand/bcm47xxnflash/main.c @@ -77,6 +77,7 @@ static int bcm47xxnflash_remove(struct platform_device *pdev) } static struct platform_driver bcm47xxnflash_driver = { + .probe = bcm47xxnflash_probe, .remove = bcm47xxnflash_remove, .driver = { .name = "bcma_nflash", @@ -88,11 +89,7 @@ static int __init bcm47xxnflash_init(void) { int err; - /* - * Platform device "bcma_nflash" exists on SoCs and is registered very - * early, it won't be added during runtime (use platform_driver_probe). - */ - err = platform_driver_probe(&bcm47xxnflash_driver, bcm47xxnflash_probe); + err = platform_driver_register(&bcm47xxnflash_driver); if (err) pr_err("Failed to register bcm47xx nand flash driver: %d\n", err);