From patchwork Wed May 31 22:40:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Adami X-Patchwork-Id: 9758381 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC5D3602BF for ; Wed, 31 May 2017 22:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B953C28453 for ; Wed, 31 May 2017 22:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ACFFF284D2; Wed, 31 May 2017 22:43:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6D39228453 for ; Wed, 31 May 2017 22:43:53 +0000 (UTC) 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=iBW8FVZP6BCGTzGTrzhIWvJtK/OwAikj1EUyLYXYZdU=; b=f4JVIHEc+zjZQDdub/20wQ4IhC viRefERKXOttppf5D0ggsvVjX3BQzqdGBw8ClsdddZvjZrf2mQiG+XakZ+ODuqV0MOw525oh3eE/r crTjdpJUA2aXuoadlzGdLntucuVkGpFnneyCAf+dlIJaC8Z5FVFFPgLRc61f5/L7sFmTiKFrmE3Z8 lr1Vfuwi/M0+/+IKWTiBM+WVvijzO771MsvbSlrw2FyfshnnsW3JdtOzt+KJYywN/FMfTaCr5hZRN 3HmpvuOWzUhg0FRNvq4uL54N7xqwhURONg/F4PsV07Ow/Ex+AvQbdM7fhHp/A2qRKhEhGiVTNsGK3 vXf5HbqA==; 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 1dGCLH-0007nY-Fq; Wed, 31 May 2017 22:43:51 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dGCIx-0004fy-A0; Wed, 31 May 2017 22:41:30 +0000 Received: by mail-wm0-x242.google.com with SMTP id k15so6946702wmh.3; Wed, 31 May 2017 15:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TbPKTlD4YLQUDWV8PzK/FFSP//NCGgXdmWkQ6pl6sbs=; b=CnpYUUPzsLbvYMw5OCgrWkX+Zz10KDi0Jd4pNQHyPSiGjRj6iWglsiM7Dygq1n0vTV /WYTg4E3EnH1yfOqYuHcTVcFgWRoWPsiYU53zKmkF/5uRH7PMdaA7HbElZdGnB+vfUPW 5qqxLGG9OKIGGiYvtdnlOUTe538coI2aC709w0pAtSe1uQR3eZYRjsu57nEBmBglKTv+ 1LdvdpBBrb/FbZorTnR/nfFzb8dNpduZORz4lMCCON40k4U10Dueza4nx7f5wrNFgxO1 olk1zE7VigRIiH70Uo2W3Otr3KJrDlKT2fZ105xRMOk/pgXqndjBuf2YgvbL7urXma4s hd+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TbPKTlD4YLQUDWV8PzK/FFSP//NCGgXdmWkQ6pl6sbs=; b=UhsOgwV+iteqw+aGQc3uXv5TWynPEKo8T2lpFt4UVA2inJJkDIcx0M4zsHqqkUkasB AZfr2WheEr6R4N+uKhI3coi+oILBSv3hGSq7pdyFqUHnxg5FV4XryXGOHCcH18YqP/Lx g5shJIcOYSLyjH7RId8MghFHA2mhgQau2CFXR5RgnWPmBAOjdgQI86EF4cTbjedewaWR zUe5uvd/vxj4SupWzx+wByQGqxIp9GZpKrm3OneybWQoh1Wuqelii3i686t3K3TgTc8O 6YOTF0+1xyIpbuBAXqLraMxK+tVn1LXZRiml1jqbNsb7ScRDROwRB25tbaxHk1QYW5bS Zyhw== X-Gm-Message-State: AODbwcDBJq1njlbxYk+pHVXxVQy9wqCpc3a8MgLqKkfpoPokwsbzDyBH FQ9lbpDIkWA5pf+RwPU= X-Received: by 10.28.199.10 with SMTP id x10mr6628512wmf.83.1496270468067; Wed, 31 May 2017 15:41:08 -0700 (PDT) Received: from andrea-ThinkPad-T520.homenet.telecomitalia.it (host134-11-dynamic.32-79-r.retail.telecomitalia.it. [79.32.11.134]) by smtp.gmail.com with ESMTPSA id j1sm41840356wmf.6.2017.05.31.15.41.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 15:41:07 -0700 (PDT) From: Andrea Adami To: linux-mtd@lists.infradead.org Subject: [PATCH v3 4/9] mtd: nand: sharpsl.c: take in account partition parser types Date: Thu, 1 Jun 2017 00:40:53 +0200 Message-Id: <1496270458-6479-5-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1496270458-6479-1-git-send-email-andrea.adami@gmail.com> References: <1496270458-6479-1-git-send-email-andrea.adami@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170531_154127_593851_F9E01DB6 X-CRM114-Status: GOOD ( 12.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Wolfram Sang , Dmitry Eremin-Solenikov , Richard Weinberger , Robert Jarzmik , linux-mmc@vger.kernel.org, Russell King , Haojian Zhuang , linux-kernel@vger.kernel.org, Marek Vasut , linux-arm-kernel@lists.infradead.org, Cyrille Pitchen , Lee Jones , Brian Norris , David Woodhouse , Linus Walleij , Daniel Mack MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Andrea Adami --- drivers/mtd/nand/sharpsl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c index 064ca17..1a76779 100644 --- a/drivers/mtd/nand/sharpsl.c +++ b/drivers/mtd/nand/sharpsl.c @@ -183,8 +183,13 @@ static int sharpsl_nand_probe(struct platform_device *pdev) /* Register the partitions */ mtd->name = "sharpsl-nand"; - err = mtd_device_parse_register(mtd, NULL, NULL, - data->partitions, data->nr_partitions); + err = mtd_device_parse_register(&sharpsl->mtd, + data->types ? data->types : NULL, + NULL, + data->partitions ? + data->partitions : NULL, + data->nr_partitions ? + data->nr_partitions : 0); if (err) goto err_add;