From patchwork Mon Dec 14 13:09:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjit Waghmode X-Patchwork-Id: 7844401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 61F8CBEEE1 for ; Mon, 14 Dec 2015 13:13:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B9AC2038E for ; Mon, 14 Dec 2015 13:13:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D7C920382 for ; Mon, 14 Dec 2015 13:13:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a8Sug-0005Zj-BQ; Mon, 14 Dec 2015 13:11:38 +0000 Received: from mail-sn1nam02on0058.outbound.protection.outlook.com ([104.47.36.58] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a8Sub-0005OU-7A; Mon, 14 Dec 2015 13:11:34 +0000 Received: from SN1NAM02FT030.eop-nam02.prod.protection.outlook.com (10.152.72.55) by SN1NAM02HT161.eop-nam02.prod.protection.outlook.com (10.152.72.140) with Microsoft SMTP Server (TLS) id 15.1.346.13; Mon, 14 Dec 2015 13:11:11 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT030.mail.protection.outlook.com (10.152.72.114) with Microsoft SMTP Server (TLS) id 15.1.346.13 via Frontend Transport; Mon, 14 Dec 2015 13:11:10 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1a8SuD-0002c2-Lt; Mon, 14 Dec 2015 05:11:09 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1a8SuD-0002dv-Gw; Mon, 14 Dec 2015 05:11:09 -0800 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id tBEDB4Uw008115; Mon, 14 Dec 2015 05:11:04 -0800 Received: from [172.23.64.207] (helo=xhd-lin64re117.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1a8Su7-0002as-Qy; Mon, 14 Dec 2015 05:11:04 -0800 Received: by xhd-lin64re117.xilinx.com (Postfix, from userid 32810) id 0D14420923; Mon, 14 Dec 2015 18:41:03 +0530 (IST) From: Ranjit Waghmode To: , , , , , , , , , , , , , , , , Subject: [LINUX RFC v3 2/4] mtd: add spi_device instance to spi_nor struct Date: Mon, 14 Dec 2015 18:39:43 +0530 Message-ID: <1450098585-3129-3-git-send-email-ranjit.waghmode@xilinx.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1450098585-3129-1-git-send-email-ranjit.waghmode@xilinx.com> References: <1450098585-3129-1-git-send-email-ranjit.waghmode@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22000.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(107886002)(63266004)(48376002)(36756003)(42186005)(586003)(33646002)(4001450100002)(76176999)(19580405001)(4001430100002)(50986999)(19580395003)(36386004)(1096002)(1220700001)(87936001)(11100500001)(2201001)(2950100001)(189998001)(45336002)(46386002)(103686003)(50466002)(92566002)(90966002)(6806005)(52956003)(50226001)(81156007)(5001770100001)(47776003)(5003940100001)(106466001)(5008740100001)(229853001)(86362001)(5001960100002)(107986001)(921003)(217873001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1NAM02HT161; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:SN1NAM02HT161; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:SN1NAM02HT161; BCL:0; PCL:0; RULEID:; SRVR:SN1NAM02HT161; X-Forefront-PRVS: 0790FB1F33 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2015 13:11:10.3465 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM02HT161 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151214_051133_352335_65F58088 X-CRM114-Status: GOOD ( 11.55 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: harinik@xilinx.com, Ranjit Waghmode , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org, punnaia@xilinx.com, ran27jit@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds struct spi_device instacne to the spi_nor structure. Signed-off-by: Ranjit Waghmode --- V3 Changes: - No change in this patch V2 Changes: - This is new patch, basically splitted on request of Mark Brown --- drivers/mtd/devices/m25p80.c | 1 + include/linux/mtd/spi-nor.h | 1 + 2 files changed, 2 insertions(+) -- 2.1.2 diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index fe9ceb7..bab4939 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -204,6 +204,7 @@ static int m25p_probe(struct spi_device *spi) spi_set_drvdata(spi, flash); flash->spi = spi; + nor->spi = spi; if (spi->mode & SPI_RX_QUAD) mode = SPI_NOR_QUAD; diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index c8723b6..872b2b4 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -155,6 +155,7 @@ struct spi_nor { struct mtd_info mtd; struct mutex lock; struct device *dev; + struct spi_device *spi; struct device_node *flash_node; u32 page_size; u8 addr_width;