From patchwork Tue Mar 13 12:56:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 7262 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 18C9E23DEA for ; Tue, 13 Mar 2012 12:57:19 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id CB8DAA18577 for ; Tue, 13 Mar 2012 12:57:18 +0000 (UTC) Received: by iage36 with SMTP id e36so1008340iag.11 for ; Tue, 13 Mar 2012 05:57:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :x-gm-message-state; bh=JS8rnFzWVGrpGu6W09tNU3Jh5j7Lo6E3BKS7jLh4idI=; b=XQHB/wT3gnk/1hy8lDxJfUC6KymnLMu6E4DRrqt/NCWdW1JlzmKTDViG8tiBgZP7NJ svtJ5VM8vl4jUSJI+mOhCjISA0IzN6exv3wNWj1U4bHQsyEk54G9I5E7gj1hWWIuwlLb 0KECaFv4quM/ySE3XpHekFzIdAdV25S3pQZm2Rzf+5cUJoDMoEqff9liEuCS0UTuknB2 wYZklO7JFIsQmGmFPL0iUZfXkqRKRqIbwuhO/2FPRC4zlUkzwYAE5ueDmB59ul+MooSt JS2tHUbKeaKJYi0FoBPRR+t8MWB2uoF3gkWs4bFdGl2+NwE4c2b50nXvEjC2zqovKQzi Qqng== Received: by 10.42.145.72 with SMTP id e8mr20464492icv.0.1331643438282; Tue, 13 Mar 2012 05:57:18 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.53.18 with SMTP id k18csp64404ibg; Tue, 13 Mar 2012 05:57:17 -0700 (PDT) Received: by 10.14.95.12 with SMTP id o12mr2393650eef.80.1331643436504; Tue, 13 Mar 2012 05:57:16 -0700 (PDT) Received: from eu1sys200aog105.obsmtp.com (eu1sys200aog105.obsmtp.com. [207.126.144.119]) by mx.google.com with SMTP id e6si166411eeo.108.2012.03.13.05.57.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Mar 2012 05:57:16 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.119; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.119 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKT19EHo7dGgIZD0EDbWtKHe86KCn39HAC@postini.com; Tue, 13 Mar 2012 12:57:15 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id DAA82EE; Tue, 13 Mar 2012 12:48:34 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 17EE811C6; Tue, 13 Mar 2012 12:56:58 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 4EC78A8072; Tue, 13 Mar 2012 13:56:52 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 13 Mar 2012 13:56:57 +0100 From: Linus Walleij To: David Woodhouse , Artem Bityutskiy , Cc: Vipin Kumar , Armando Visconti , Vincenzo Frascino , Linus Walleij , , Dmitry Eremin-Solenikov Subject: [PATCH] mtd: fsmc_nand: restore platform data partition support Date: Tue, 13 Mar 2012 13:56:45 +0100 Message-ID: <1331643405-759-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.8 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQn+TdZK0pnI+OaFFJRBtw2Z/pnJFWvXMR088S2RmrmamP346FaRVWcEf/SEKFHHDK9niF6P From: Linus Walleij Commit 0d04eda1430e9a796214bee644b7e05d99cfe613 "mtd: fsmc_nand.c: use mtd_device_parse_register" accidentally broke the platform data partition supply capability in the FSMC driver, this make it work again. Tested on the U300 that use this scheme. Cc: stable@kernel.org Cc: Dmitry Eremin-Solenikov Signed-off-by: Linus Walleij --- drivers/mtd/nand/fsmc_nand.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index e53b760..fd9f94f 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c @@ -713,7 +713,12 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) * Check for partition info passed */ host->mtd.name = "nand"; - ret = mtd_device_parse_register(&host->mtd, NULL, 0, + if (pdata->partitions) + ret = mtd_device_parse_register(&host->mtd, NULL, 0, + pdata->partitions, + pdata->nr_partitions); + else + ret = mtd_device_parse_register(&host->mtd, NULL, 0, host->mtd.size <= 0x04000000 ? partition_info_16KB_blk : partition_info_128KB_blk,