From patchwork Wed Jan 3 10:55:43 2018 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: 854965 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="r8PLM+2b"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OzTn9020"; dkim-atps=neutral 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 3zBSYt75mjz9s7n for ; Wed, 3 Jan 2018 21:57:22 +1100 (AEDT) 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=zHlm8KgqtehiPOuT39GyPXauhYKxkj5/7UUE7ZBths8=; b=r8PLM+2bLUWmqT n65KBr5j7Q3H38pgsh0LWrXYrBC7KWK95Y5eq2PQqsSRfH1CDOX+rz11FyKwNKrc/EY/abGXfX41L GcObD3815TviuH5U6upf42AHy2lGnZl0Ymno2jygAHR3jZMSXxOguCAXiERM7yhX8pw0TWZd2SLOW PZD8pJMZDjZqtGZvY/Sqmeo0Puaesq/Lt7bilLFeNUejdknyDe68+83f6GqmOwIE0FJzUpB9RSpl8 2xOqvN98600l5sMUstPFQyzRvhoDDmUGhiKE72GK2YKdYcYUnnOpbiJWh45b8qhD3cBSGVQp/LIff /E0tyVF872pifmheUm3Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eWgjN-0000WE-Nh; Wed, 03 Jan 2018 10:57:09 +0000 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eWgiy-0000Gm-Dk for linux-mtd@lists.infradead.org; Wed, 03 Jan 2018 10:56:46 +0000 Received: by mail-lf0-x242.google.com with SMTP id a12so1248004lfe.13 for ; Wed, 03 Jan 2018 02:56:33 -0800 (PST) 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=UqP7dqIJWvWRAyR/26GDDGYxve8+oDgmKsslkdMpdaw=; b=OzTn9020/4cyLYsQJoQMVZWNcYvOWXBLJh9CGpO1HFbLFSQmjgWWke2OJCLiYoXLBi BIydOAvt8RPnNcTaOBmkdiz62tr/UiTDFWRgq5wzSaRu0/W0zmyVBHClQlDH71HVa3/E dhYIZe4Ar9cRxLhEmvJTAWPOtvV5D6eGyaxWkefcffZxkelH35EYzIHNVdBgvEowP8S0 kzz3lcW0T9N16M9aEvnPyjPGDn7usb9MFPmZoVCTaABr0ggwwsJNsXZC5N5zguArX6n7 ui2ha+mNakMWcY2PGCtcVEtmKsSZKwsQI7b92YzFZGDtZc9lPOG7umDG7kYpNIjyhemt NgJw== 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=UqP7dqIJWvWRAyR/26GDDGYxve8+oDgmKsslkdMpdaw=; b=oKfVPy+kpiiLKQedH8jmGLUfx1+j51ttCt27AgAkqVhtMb+W3ZspntxzMrO89DHplL FNnfrd5+iLeAiFaPR4LFdB8kHvLxFliaZLuaXIU5CWRJFl6eX2RXL+1/64zOnVosWgyg QervGyM2bDeuq94A9KtwuHK+gOMPh9z+iBXW3dxwFVpPRwa3I8qEMD7/OFUvJO1+361x MaDFhoI/3cFRu7lXiYDutRU6+ykvUx62KVS4oxf44fwGBI67UFr6fheeVUnzl8d9EXdm wyAexEPu0Ap8q4VdaV7TPqxwnQ54p5Iolc+N22uAv88JmSQgxFLpjnDM4PCkZyDIkLA3 owDw== X-Gm-Message-State: AKGB3mIY/ner16H9L3SBl0cUtzNzRr4Q9aWobLDvj4HUfLej9wt1a5Ol MgsK89n0PP2aESuP7aGtZHA= X-Google-Smtp-Source: ACJfBou3H5DGWB3VIzGsfsiodBhvB1I2CtZPbdI9rwn4qLOOh7kzsrjU4vsGcxA7xZtJkMUEoXAcrA== X-Received: by 10.25.83.212 with SMTP id h81mr656254lfl.121.1514976991865; Wed, 03 Jan 2018 02:56:31 -0800 (PST) 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 21sm148160lje.96.2018.01.03.02.56.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 02:56:31 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Brian Norris , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , Rob Herring Subject: [PATCH V6 2/2] mtd: ofpart: add of_match_table with "fixed-partitions" Date: Wed, 3 Jan 2018 11:55:43 +0100 Message-Id: <20180103105543.17897-2-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180103105543.17897-1-zajec5@gmail.com> References: <20180102130458.16226-1-zajec5@gmail.com> <20180103105543.17897-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180103_025644_596245_A0DDA909 X-CRM114-Status: GOOD ( 11.19 ) 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:242 listed in] [list.dnswl.org] 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) -0.0 SPF_PASS SPF: sender matches SPF record -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: Mark Rutland , devicetree@vger.kernel.org, Florian Fainelli , Geert Uytterhoeven , Linus Walleij , John Crispin , linux-mtd@lists.infradead.org, Jonas Gorski , =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , 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 6bdf4e525677..92fcbac046d9 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,