From patchwork Tue Mar 21 10:04:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 741482 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vnT4w3h40z9s2x for ; Tue, 21 Mar 2017 21:07:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A7adXBi6"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=08TEZ3IWnUyx2TrZU4iBQxR4psm7ty7kQX23rSnhM+0=; b=A7adXBi6xWYuMqb1HbQjTKMEe0 bL56RjRjMYNoGyF4mvUsfQJtk06MJooB4qUOCX2cVoWqv5tP5aiv2yj2NJPVj9onkYR5jfEJjKFwu NLANTMzKENXd+i03NTNl/+FF+fgPEHZXh9dkNER3jkNXfpGl3anJWh6B053AkCF9XP9/b2r3LfZH1 mKlCq8pPmN/7h9A7lji8fxoeF/u03OpFboWxq265/QM0t1+vVi6H2GuSIaVkVQXEND+Up2TWo2mhB CUL9ARWpKnznnXVQF5PW1ZRaCE0me3MNuFFVlNPoGtHBTWm9mOWstY9Yriu9BrGwlFhK8PlSaHP9F lhblR8jg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqGh4-0004CL-1X; Tue, 21 Mar 2017 10:07:10 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cqGf7-0000Pq-Rw for linux-mtd@lists.infradead.org; Tue, 21 Mar 2017 10:05:23 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 683C620F60; Tue, 21 Mar 2017 11:04:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 460AB207ED; Tue, 21 Mar 2017 11:04:25 +0100 (CET) From: Thomas Petazzoni To: Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen Subject: [PATCH 08/13] mtd: nand: fsmc: kill {nr_, }partitions structure fields Date: Tue, 21 Mar 2017 11:04:00 +0100 Message-Id: <1490090645-8576-9-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490090645-8576-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1490090645-8576-1-git-send-email-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170321_030511_033055_C2CA0BCB X-CRM114-Status: GOOD ( 12.24 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Linus Walleij , Stefan Roese , linux-mtd@lists.infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The ->partitions and ->nr_partitions fields of struct fsmc_nand_platform_data are never set anywhere, so they are always NULL/0. The corresponding fields in 'struct fsmc_nand_data' are set to the value of the same fields in fsmc_nand_platform_data, i.e NULL/0. Therefore, we remove those two fields, and pass NULL/0 directly to mtd_device_register(), like many other NAND drivers already do. At the same time, we remove the comment about the fact that we pass partition info, since we are no longer doing this. Signed-off-by: Thomas Petazzoni Reviewed-by: Linus Walleij --- drivers/mtd/nand/fsmc_nand.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 0d618ad..8342c39 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -146,8 +146,6 @@ enum access_mode { */ struct fsmc_nand_platform_data { struct fsmc_nand_timings *nand_timings; - struct mtd_partition *partitions; - unsigned int nr_partitions; unsigned int options; unsigned int bank; @@ -179,8 +177,6 @@ struct fsmc_nand_platform_data { struct fsmc_nand_data { u32 pid; struct nand_chip nand; - struct mtd_partition *partitions; - unsigned int nr_partitions; unsigned int bank; struct device *dev; @@ -1000,8 +996,6 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) AMBA_REV_BITS(pid), AMBA_CONFIG_BITS(pid)); host->bank = pdata->bank; - host->partitions = pdata->partitions; - host->nr_partitions = pdata->nr_partitions; host->dev = &pdev->dev; host->dev_timings = pdata->nand_timings; host->mode = pdata->mode; @@ -1139,18 +1133,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) if (ret) goto err_probe; - /* - * The partition information can is accessed by (in the same precedence) - * - * command line through Bootloader, - * platform data, - * default partition information present in driver. - */ - /* - * Check for partition info passed - */ mtd->name = "nand"; - ret = mtd_device_register(mtd, host->partitions, host->nr_partitions); + ret = mtd_device_register(mtd, NULL, 0); if (ret) goto err_probe;