From patchwork Thu Jan 24 16:39:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 215441 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 C37022C00A5 for ; Fri, 25 Jan 2013 03:41:37 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyPqp-0005xT-Cp; Thu, 24 Jan 2013 16:40:31 +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 1TyPqX-0005qv-L9 for linux-mtd@lists.infradead.org; Thu, 24 Jan 2013 16:40:14 +0000 Received: from localhost (localhost [127.0.0.1]) by hauke-m.de (Postfix) with ESMTP id 133A98F63; Thu, 24 Jan 2013 17:40:13 +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 rI0Bk7Wne4su; Thu, 24 Jan 2013 17:40:09 +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 CE7128F68; Thu, 24 Jan 2013 17:40:03 +0100 (CET) From: Hauke Mehrtens To: dwmw2@infradead.org Subject: [PATCH 2/6] mtd: bcm47xxsflash: register this as normal driver Date: Thu, 24 Jan 2013 17:39:55 +0100 Message-Id: <1359045599-1305-3-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_114013_850665_DDD6A4E7 X-CRM114-Status: GOOD ( 11.78 ) 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 serial flash chip controller and chip and for them an error message was shown. Signed-off-by: Hauke Mehrtens --- drivers/mtd/devices/bcm47xxsflash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/devices/bcm47xxsflash.c b/drivers/mtd/devices/bcm47xxsflash.c index 61a45cb..729ca5f 100644 --- a/drivers/mtd/devices/bcm47xxsflash.c +++ b/drivers/mtd/devices/bcm47xxsflash.c @@ -89,6 +89,7 @@ static int bcm47xxsflash_remove(struct platform_device *pdev) } static struct platform_driver bcma_sflash_driver = { + .probe = bcm47xxsflash_probe, .remove = bcm47xxsflash_remove, .driver = { .name = "bcma_sflash", @@ -100,7 +101,7 @@ static int __init bcm47xxsflash_init(void) { int err; - err = platform_driver_probe(&bcma_sflash_driver, bcm47xxsflash_probe); + err = platform_driver_register(&bcma_sflash_driver); if (err) pr_err("Failed to register BCMA serial flash driver: %d\n", err);