From patchwork Wed May 24 23:49:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 766729 X-Patchwork-Delegate: computersforpeace@gmail.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 3wY8KL6RRBz9s8F for ; Thu, 25 May 2017 09:50:30 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PJIPO0Mb"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="felhov0W"; 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=4tM8SVpTCETQdgF/cUdeUInv2YHheTVDURAp4kxgVx4=; b=PJIPO0Mbfde/ruyoPD00T3x4So 1+QGgQXttlE6P8Cjnz7vqrv2FAKdHduRRB6bCu3EjpWYTkXzr15rsFw6/M3FoTIwpxq89hZLoM+GH IJxh2Fz1vUKSE+PogymXPr4vX9XsHD3DX4MXZmqyY0vSSDcUwmnZvvzEwlrr23jHJo75ksQH7WcKz 0WA6P7iExi0GByG5RvvqOm4a6h28QZjqcVRkI/YydTxiMmFiLAqB40pYuIHpRGeux+RueTe271q1+ 2NnE6W3DkL3VlZJbZ9tr9vDcjpwlaILEzu3Bn0oxzGoKRyLZY952weDAVOwxrQeEcCymy9KyVq9MG V8KhnBTw==; 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 1dDg2t-0002G1-G7; Wed, 24 May 2017 23:50:27 +0000 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDg2E-0000H8-WF for linux-mtd@lists.infradead.org; Wed, 24 May 2017 23:49:50 +0000 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 327008448C; Thu, 25 May 2017 11:49:20 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail; t=1495669760; bh=b8p7j8C20OcW18Bk12gGfTGo4gYd/Uan2V6XEDE2Pr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=felhov0Wi2u4Ik/MOXQ/bkKZ978FNjO+L+u2OAqE3OzlHEPzNFr8MyCbMzxYd0p/Y /AlS7Yw2jE9sG68B+zLi89n8H23MZ/YbbwCVt7P2VaXcuOTU30LLul6+CuqOFmvkAW dzTnAnBEAMkeIPAw9Sv62eJtsKyJhijmtRlhVHEM= Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 7, 9061) id ; Thu, 25 May 2017 11:49:19 +1200 Received: from chrisp-dl.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id D99FD13EFAF; Thu, 25 May 2017 11:49:21 +1200 (NZST) Received: by chrisp-dl.atlnz.lc (Postfix, from userid 1030) id A110A1E1DA3; Thu, 25 May 2017 11:49:19 +1200 (NZST) From: Chris Packham To: linux-mtd@lists.infradead.org, andrew@lunn.ch, computersforpeace@gmail.com, dwmw2@infradead.org, boris.brezillon@free-electrons.com, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/5] mtd: mchp23k256: switch to mtd_device_register() Date: Thu, 25 May 2017 11:49:13 +1200 Message-Id: <20170524234916.16181-3-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170524234916.16181-1-chris.packham@alliedtelesis.co.nz> References: <20170524234916.16181-1-chris.packham@alliedtelesis.co.nz> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170524_164947_408990_957F20F6 X-CRM114-Status: UNSURE ( 8.75 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -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] -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 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: Cyrille Pitchen , Marek Vasut , Chris Packham , Richard Weinberger MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use mtd_device_register() instead of mtd_device_parse_register() to eliminate two unused parameters. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Acked-by: Boris Brezillon --- Changes in v2 - collect review/test from Andrew Changes in v3: - None Changes in v4: - None drivers/mtd/devices/mchp23k256.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/devices/mchp23k256.c b/drivers/mtd/devices/mchp23k256.c index 9d8306a15833..2542f5b8b63f 100644 --- a/drivers/mtd/devices/mchp23k256.c +++ b/drivers/mtd/devices/mchp23k256.c @@ -151,9 +151,8 @@ static int mchp23k256_probe(struct spi_device *spi) flash->mtd._read = mchp23k256_read; flash->mtd._write = mchp23k256_write; - err = mtd_device_parse_register(&flash->mtd, NULL, NULL, - data ? data->parts : NULL, - data ? data->nr_parts : 0); + err = mtd_device_register(&flash->mtd, data ? data->parts : NULL, + data ? data->nr_parts : 0); if (err) return err;