From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dec59.ruk.cuni.cz ([2001:718:1e03:4::11]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z0GBp-0003Kh-Th for linux-mtd@lists.infradead.org; Wed, 03 Jun 2015 21:27:13 +0000 Date: 3 Jun 2015 21:26:40 -0000 Message-Id: <36e315552c849a4d22ac0fcff7958f6ffcafb160.1433364398.git.hramrach@gmail.com> In-Reply-To: References: From: Michal Suchanek Subject: [PATCH 04/11] mtd: ofpart: do not fail probe when no partitions exist To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Kukjin Kim , Krzysztof Kozlowski , Vinod Koul , Dan Williams , David Woodhouse , Brian Norris , Han Xu , Mark Brown , Michal Suchanek , Geert Uytterhoeven , Marek Vasut , "Rafał Miłecki" , Alison Chaiken , Huang Shijie , Ben Hutchings , Knut Wohlrab , "Bean Huo 霍斌斌 \(beanhuo\)" , "grmoore@altera.com" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, dmaengine@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Exynos it is necessary to set SPI controller parameters that apply to a SPI slave in a DT subnode of the slave device. The ofpart code returns an error when there are subnodes of the SPI flash but no partitions are found. Change this condition to a warning so that flash without partitions can be accessed on Exynos. Signed-off-by: Michal Suchanek --- drivers/mtd/ofpart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c index aa26c32..a29d29f 100644 --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -94,10 +94,10 @@ static int parse_ofpart_partitions(struct mtd_info *master, if (!i) { of_node_put(pp); - pr_err("No valid partition found on %s\n", node->full_name); + pr_warn("No valid partition found on %s\n", node->full_name); kfree(*pparts); *pparts = NULL; - return -EINVAL; + return 0; } return nr_parts; -- 2.1.4