Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752757AbdHNUuS (ORCPT ); Mon, 14 Aug 2017 16:50:18 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:34343 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbdHNUsy (ORCPT ); Mon, 14 Aug 2017 16:48:54 -0400 From: Andrea Adami To: linux-mtd@lists.infradead.org Cc: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Wolfram Sang , Lee Jones , Daniel Mack , Haojian Zhuang , Dmitry Eremin-Solenikov , Robert Jarzmik , Linus Walleij , Russell King , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v5 5/9] mtd: nand: tmio: Register partitions using the parsers Date: Mon, 14 Aug 2017 22:48:36 +0200 Message-Id: <1502743720-28672-6-git-send-email-andrea.adami@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502743720-28672-1-git-send-email-andrea.adami@gmail.com> References: <1502743720-28672-1-git-send-email-andrea.adami@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1020 Lines: 29 With the introduction of sharpslpart partition parser we can now read the offsets from NAND: we specify the list of the parsers as platform data, with cmdlinepart and ofpart parsers first allowing to override the part. table written in NAND. This is done in the board files using this driver. Use now these parsers. Signed-off-by: Andrea Adami --- drivers/mtd/nand/tmio_nand.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index fc5e773..47f439f 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c @@ -440,7 +440,9 @@ static int tmio_probe(struct platform_device *dev) goto err_irq; /* Register the partitions */ - retval = mtd_device_parse_register(mtd, NULL, NULL, + retval = mtd_device_parse_register(mtd, + data ? data->part_parsers : NULL, + NULL, data ? data->partition : NULL, data ? data->num_partitions : 0); if (!retval) -- 2.7.4