From patchwork Mon May 6 13:53:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 241672 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BA1E62C00E9 for ; Mon, 6 May 2013 23:55:22 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZLsQ-0007xE-S0; Mon, 06 May 2013 13:54:51 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZLsM-0004qp-A8; Mon, 06 May 2013 13:54:46 +0000 Received: from smtp41.i.mail.ru ([94.100.177.101]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZLs8-0004ln-5n for linux-mtd@lists.infradead.org; Mon, 06 May 2013 13:54:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=9iToEcBeU8x8qg2+BK1JQ46pCtJCWZ/EaSf9gv0Hb+Q=; b=nBGNQeUQHi6yng8rSg8tEtqZXVIiHymWGfttStS1oN1wBM8rX4wSaszpY0pIgnTwm47loP/O66BaKOGtkEgxo703R0XuIXbN/xmh+xo2+yhHu3qZZLCAIkvhzu49w0ll/QPkmVG3nSC3LO65j0cjr8m5jiae3MqG3Wj9cSjDUp0=; Received: from [188.134.40.128] (port=8402 helo=shc.zet) by smtp41.i.mail.ru with esmtpa (envelope-from ) id 1UZLrl-0007fX-Qb; Mon, 06 May 2013 17:54:10 +0400 From: Alexander Shiyan To: linux-mtd@lists.infradead.org Subject: [RESEND PATCH v2 2/7] mtd: nand-gpio: Use default dev_ready function if RDY is missing in configuration Date: Mon, 6 May 2013 17:53:49 +0400 Message-Id: <1367848434-28493-2-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1367848434-28493-1-git-send-email-shc_work@mail.ru> References: <1367848434-28493-1-git-send-email-shc_work@mail.ru> X-Spam: Not detected X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130506_095432_754566_88792462 X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shc_work[at]mail.ru) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Artem Bityutskiy , Brian Norris , David Woodhouse , Alexander Shiyan X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 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" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Alexander Shiyan --- drivers/mtd/nand/gpio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index c35f46e..8f102d1 100644 --- a/drivers/mtd/nand/gpio.c +++ b/drivers/mtd/nand/gpio.c @@ -136,10 +136,7 @@ static int gpio_nand_devready(struct mtd_info *mtd) { struct gpiomtd *gpiomtd = gpio_nand_getpriv(mtd); - if (gpio_is_valid(gpiomtd->plat.gpio_rdy)) - return gpio_get_value(gpiomtd->plat.gpio_rdy); - - return 1; + return gpio_get_value(gpiomtd->plat.gpio_rdy); } #ifdef CONFIG_OF @@ -307,6 +304,7 @@ static int gpio_nand_probe(struct platform_device *dev) if (ret) return ret; gpio_direction_input(gpiomtd->plat.gpio_rdy); + this->dev_ready = gpio_nand_devready; } this->IO_ADDR_W = this->IO_ADDR_R; @@ -316,7 +314,6 @@ static int gpio_nand_probe(struct platform_device *dev) /* install our routines */ this->cmd_ctrl = gpio_nand_cmd_ctrl; - this->dev_ready = gpio_nand_devready; if (this->options & NAND_BUSWIDTH_16) { this->read_buf = gpio_nand_readbuf16;