From patchwork Sat Jun 24 23:10:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 780425 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 3ww9zs2dpnz9s03 for ; Sun, 25 Jun 2017 09:11:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OIVxv0nK"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jQCQeNNx"; 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=ShxY2fsUrhaY51Xe3JlWAJtudp4WWUk9lAZz4WLKrvs=; b=OIVxv0nK8POYCl v4tjvRK9S9f/uSvKQUUO34/SrxWXTyHvz2+9sX+l47q0+g8A+icHnmUYkOe+9hjEOayNYkeLXDTG5 VWMnVvMFnz4HgHsDQO9rQXF/FwUznvxQC/mnTLRNwpma1g7r424It33aUjm21lM0w1XL5EZHPWQvo NSvAtVzF20OGmbpNNem1B9J+nr3X9riaQ/V0d1wLHaofkJVVQ/ZCAiKHJLpwXV0YKRy+E5uRSkqni M0d0lQLzcFxrLaS4WkOEpYvd3nlZnsblOwY8lrp0RiReDRYwKMZ41C2dhZVIW1k/cM/6U2Ckc8SgF VI7sTLo8DgjEhlaJyZzQ==; 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 1dOuCy-0003Qg-80; Sat, 24 Jun 2017 23:11:16 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dOuCp-0003Fi-TI for linux-mtd@lists.infradead.org; Sat, 24 Jun 2017 23:11:09 +0000 Received: by mail-lf0-x244.google.com with SMTP id n136so9879082lfn.2 for ; Sat, 24 Jun 2017 16:10:46 -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 :mime-version:content-transfer-encoding; bh=wlSVZ2Sjkpjp7qq4ctKYJxAGp3HyJMOUEzr+UQe/53Q=; b=jQCQeNNx59nVczqqQWhe9myPSog90X/zUm2GbrUqhHX2JXEUnDizybMceNICInu9iW VvxmK5ojduKwNRwonbcEoWQRhpI92aPmz2OocT5optFjxlUiYoDExNa+v20IaLcOzkjQ BWm4nz1pS9O8/udobF6bWxikUqmrdFlN05FXtTIVI6GVNI/RWMWcZYVrh08T9mLYb67G w6dhGnhMFUIwneI22ZHFF/CqklTiPXlwMIl/wY/QuyE0LBLHQKE1g/dvzyW2NrnqMKIf nC7IJrNi3Ab86xxgbRk2WQcYcMXW7oZVL59Tjg2Qo7nno1viDU/YHtLQsFN7blyf9VoE 9vqg== 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:mime-version:content-transfer-encoding; bh=wlSVZ2Sjkpjp7qq4ctKYJxAGp3HyJMOUEzr+UQe/53Q=; b=gKN5nRZSRRO9wNgX5hj/1CEwMDV6dZ1nA3Sv2/s15RuW9hf2Sg1Hs+T7mCJehm3+Bt P2LTZhv50Zf87RVqzAfyPC6uZ8vuZ4JEEeW6HIDHwH7TjUEMjz0wfRP10gU2Frvwok0o O972IuwDPXx2VWbSYhumz6557GkAfRafA320YYuM5SRrqSavE33OlhbBo+F7h82J/KFG kiV6EglOtU3RVEXdcIqbzV3uB77p65J64QyFDccShu0KjWDSXQ1YLNgvQuUPWPcJLIGt qH6fWSK7w7Ltx2h49GcTverjcbV/gVOy7stdXdXnsN1mZj1gm90QFOoNssq/P/LeScU4 2iXQ== X-Gm-Message-State: AKS2vOxMkO8U1x4hoC8Wyc1qVsCnTyl8L60qzebP/DoxRV0phoMK9J47 xaZyJIez9Bu+bw== X-Received: by 10.25.77.77 with SMTP id a74mr4698608lfb.121.1498345845454; Sat, 24 Jun 2017 16:10:45 -0700 (PDT) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id b17sm2426848lfg.32.2017.06.24.16.10.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Jun 2017 16:10:44 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Rob Herring Subject: [PATCH V4 2/2] mtd: ofpart: add of_match_table with "fixed-partitions" Date: Sun, 25 Jun 2017 01:10:25 +0200 Message-Id: <20170624231025.23292-2-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170624231025.23292-1-zajec5@gmail.com> References: <20170624231025.23292-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170624_161108_144677_0FBF15A4 X-CRM114-Status: GOOD ( 11.04 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: Mark Rutland , devicetree@vger.kernel.org, Florian Fainelli , Geert Uytterhoeven , Linus Walleij , linux-mtd@lists.infradead.org, Jonas Gorski , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Frank Rowand Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Rafał Miłecki This allows using this parser with any flash driver that takes care of setting of_node (using mtd_set_of_node helper) correctly. Up to now support for "fixed-partitions" DT compatibility string was working only with flash drivers that were specifying "ofpart" (manually or by letting mtd use the default set of parsers). This matches existing bindings documentation. Signed-off-by: Rafał Miłecki Reviewed-by: Brian Norris Tested-by: Brian Norris --- drivers/mtd/ofpart.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index 2861c7079d7b..fb6f3df40e94 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -140,9 +140,16 @@ static int parse_ofpart_partitions(struct mtd_info *master, return ret; } +static const struct of_device_id parse_ofpart_match_table[] = { + { .compatible = "fixed-partitions" }, + {}, +}; +MODULE_DEVICE_TABLE(of, parse_ofpart_match_table); + static struct mtd_part_parser ofpart_parser = { .parse_fn = parse_ofpart_partitions, .name = "ofpart", + .of_match_table = parse_ofpart_match_table, }; static int parse_ofoldpart_partitions(struct mtd_info *master,