From patchwork Sat Jun 11 23:11:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 100049 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 A2D15B707C for ; Sun, 12 Jun 2011 09:13:40 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QVXMk-0001tE-V8; Sat, 11 Jun 2011 23:13:20 +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 1QVXMk-0001Ft-F9; Sat, 11 Jun 2011 23:13:18 +0000 Received: from mail-ey0-f177.google.com ([209.85.215.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QVXLh-00011e-TJ for linux-mtd@lists.infradead.org; Sat, 11 Jun 2011 23:12:15 +0000 Received: by mail-ey0-f177.google.com with SMTP id 6so1530638eyh.36 for ; Sat, 11 Jun 2011 16:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=m1jhVVbq4WuZbDRVRlYwiaiN2+Pn34cy6i5kQcEqNuM=; b=Iknvqy1AItK6+uIzcdWIQXS4GCwDd52ByLYIBVOfWBiEJuDpRDIL4xQDmOyIqNYwzH Ogeb9Fi36XS5RepwQcPGAvQruwADg6rsWHhbPvB1OejvyTF8FvX2ki1Acs6loGNdaUSy ukJQZlZ2FFxKq+5ALHPtedahLsu8vojZhsBqw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Ml4WOvL0l/AwLrPe3k1nJQhQztf5/HL2tBPUg6Pm7R1leMB1WQ3ecKCrAq2iBSVfkV Wy5+rzgNljTWPVjXeTejQlREmjv4H2efDMPSZinjz5zO7GwF8f9aYPrproKFNV/RaSb7 RX0LRrKt8Kt+vgSOj2Y9WCa7TOI/qP/RA92hI= Received: by 10.14.17.15 with SMTP id i15mr1591036eei.90.1307833933502; Sat, 11 Jun 2011 16:12:13 -0700 (PDT) Received: from doriath.lumag.dynalias.net (ppp89-110-7-240.pppoe.avangarddsl.ru [89.110.7.240]) by mx.google.com with ESMTPS id y6sm3745991eem.4.2011.06.11.16.12.11 (version=SSLv3 cipher=OTHER); Sat, 11 Jun 2011 16:12:12 -0700 (PDT) From: Dmitry Eremin-Solenikov To: linux-mtd@lists.infradead.org Subject: [PATCH 07/18] mtd: mpc5121_nfc: use ofpart through generic parsing Date: Sun, 12 Jun 2011 03:11:51 +0400 Message-Id: <1307833922-21602-8-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1307833922-21602-1-git-send-email-dbaryshkov@gmail.com> References: <1307833922-21602-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110611_191214_168036_EA614624 X-CRM114-Status: GOOD ( 10.70 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (dbaryshkov[at]gmail.com) -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 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL Cc: David Woodhouse , dedekind1@gmail.com 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: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Convert the driver to use ofpart partitions parsing through the generic parse_mtd_partitions(). Signed-off-by: Dmitry Eremin-Solenikov --- drivers/mtd/nand/mpc5121_nfc.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 0b61367..996ee29 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c @@ -661,6 +661,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op) int resettime = 0; int retval = 0; int rev, len; + struct mtd_part_parser_data ppdata; /* * Check SoC revision. This driver supports only NFC @@ -725,6 +726,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op) } mtd->name = "MPC5121 NAND"; + ppdata.of_node = dn; chip->dev_ready = mpc5121_nfc_dev_ready; chip->cmdfunc = mpc5121_nfc_command; chip->read_byte = mpc5121_nfc_read_byte; @@ -836,11 +838,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op) dev_set_drvdata(dev, mtd); /* Register device in MTD */ - retval = parse_mtd_partitions(mtd, NULL, &parts, 0); -#ifdef CONFIG_MTD_OF_PARTS - if (retval == 0) - retval = of_mtd_parse_partitions(dev, dn, &parts); -#endif + retval = parse_mtd_partitions(mtd, NULL, &parts, &ppdata); if (retval < 0) { dev_err(dev, "Error parsing MTD partitions!\n"); devm_free_irq(dev, prv->irq, mtd);