From patchwork Thu May 1 09:56:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 29482 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f200.google.com (mail-qc0-f200.google.com [209.85.216.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5A83320B8D for ; Thu, 1 May 2014 09:58:27 +0000 (UTC) Received: by mail-qc0-f200.google.com with SMTP id l6sf9485970qcy.11 for ; Thu, 01 May 2014 02:58:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=YyLvyQ05qBkSZXIDxhbNTp9C4M/1xR+RlSLexpyHnm8=; b=k/ihFWUxmrfsSZM10aQZuTPTgpgiSAIrQWBocmgVE8YDXTZqDG492udAYrKjw5N60v lc0Db0dO4ecW0wGMcFi0rkTsCYyb7tjxwm8pBsT7ajosvUnDIycxca2CmOKkvQHLbSza Z/6ZZFRBWheu5I682Zut9k41mkwZQBrAhBZLtN2+W7MAG6tzd6AyrUIL2n/nmdrARafP bflQ5aggaJYK7Sh+lWahoigK3pDjJo6pBM23akCy4XPfCzJFAHMADiRg9fzbCa2rRgNZ qt0D/gY7sDFiAz9xf8ptdJRZFtUgKRujYofC0eTsvA4O58yh/RrzDf3EfvefYfgbM3ao oPgw== X-Gm-Message-State: ALoCoQkeaBQI94pjP4wwh+aVGB458txyG12nwD6He6QHnXyJzy4vsaR5rLetoq+xKEoOudVmuxTj X-Received: by 10.58.168.137 with SMTP id zw9mr5635452veb.15.1398938307142; Thu, 01 May 2014 02:58:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.80.107 with SMTP id b98ls1039771qgd.64.gmail; Thu, 01 May 2014 02:58:27 -0700 (PDT) X-Received: by 10.221.34.7 with SMTP id sq7mr8131532vcb.5.1398938307070; Thu, 01 May 2014 02:58:27 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id sn5si5951709vdc.191.2014.05.01.02.58.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 02:58:27 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id id10so3666766vcb.17 for ; Thu, 01 May 2014 02:58:27 -0700 (PDT) X-Received: by 10.58.123.71 with SMTP id ly7mr8215748veb.11.1398938307005; Thu, 01 May 2014 02:58:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp12972vcb; Thu, 1 May 2014 02:58:26 -0700 (PDT) X-Received: by 10.180.91.161 with SMTP id cf1mr2008391wib.1.1398938306197; Thu, 01 May 2014 02:58:26 -0700 (PDT) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx.google.com with ESMTPS id x6si567240wie.104.2014.05.01.02.58.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 02:58:26 -0700 (PDT) Received-SPF: none (google.com: lee.jones@linaro.org does not designate permitted sender hosts) client-ip=209.85.212.182; Received: by mail-wi0-f182.google.com with SMTP id d1so404117wiv.15 for ; Thu, 01 May 2014 02:58:25 -0700 (PDT) X-Received: by 10.180.21.180 with SMTP id w20mr1543782wie.34.1398938305534; Thu, 01 May 2014 02:58:25 -0700 (PDT) Received: from lee--X1.home (host109-148-238-223.range109-148.btcentralplus.com. [109.148.238.223]) by mx.google.com with ESMTPSA id bj5sm2696494wib.3.2014.05.01.02.58.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 02:58:24 -0700 (PDT) From: Lee Jones To: linux-kernel@vger.kernel.org Cc: computersforpeace@gmail.com, linux-mtd@lists.infradead.org, kernel@stlinux.com, Lee Jones Subject: [PATCH 39/47] mtd: nand: stm_nand_bch: parse partitions and register an MTD device Date: Thu, 1 May 2014 10:56:46 +0100 Message-Id: <1398938214-17847-40-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398938214-17847-1-git-send-email-lee.jones@linaro.org> References: <1398938214-17847-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Issue the core parse partitions and register as MTD device call. Signed-off-by: Lee Jones --- drivers/mtd/nand/stm_nand_bch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/stm_nand_bch.c b/drivers/mtd/nand/stm_nand_bch.c index 6aaa118..0f96f75 100644 --- a/drivers/mtd/nand/stm_nand_bch.c +++ b/drivers/mtd/nand/stm_nand_bch.c @@ -1924,6 +1924,7 @@ static void *stm_bch_dt_get_pdata(struct platform_device *pdev) static int stm_nand_bch_probe(struct platform_device *pdev) { + const char *part_probes[] = { "cmdlinepart", "ofpart", NULL, }; struct stm_plat_nand_bch_data *pdata = pdev->dev.platform_data; struct device_node *np = pdev->dev.of_node; struct mtd_part_parser_data ppdata; @@ -2045,7 +2046,9 @@ static int stm_nand_bch_probe(struct platform_device *pdev) nandi_dump_bad_blocks(nandi); - return 0; + /* Add partitions */ + return mtd_device_parse_register(mtd, part_probes, &ppdata, + bank->partitions, bank->nr_partitions); } static int stm_nand_bch_remove(struct platform_device *pdev)