Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753613AbcK0Ish (ORCPT ); Sun, 27 Nov 2016 03:48:37 -0500 Received: from mail-co1nam03on0083.outbound.protection.outlook.com ([104.47.40.83]:15061 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753148AbcK0Is1 (ORCPT ); Sun, 27 Nov 2016 03:48:27 -0500 X-Greylist: delayed 886 seconds by postgrey-1.27 at vger.kernel.org; Sun, 27 Nov 2016 03:48:27 EST 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; X-IncomingTopHeaderMarker: OriginalChecksum:;UpperCasedChecksum:;SizeAsReceived:1650;Count:16 From: Naga Sureshkumar Relli To: , , , , CC: , , , Subject: [LINUX RFC v4 2/4] mtd: add spi_device instance to spi_nor struct Date: Sun, 27 Nov 2016 14:03:30 +0530 Message-ID: <1480235610-33960-1-git-send-email-nagasure@xilinx.com> X-Mailer: git-send-email 2.1.1 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22724.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-IncomingHeaderCount: 16 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(189002)(199003)(52956003)(356003)(2201001)(38730400001)(8936002)(39450400002)(7846002)(50226002)(39410400001)(39400400001)(39380400001)(103686003)(81156014)(81166006)(63266004)(8676002)(106466001)(305945005)(36756003)(92566002)(50466002)(45336002)(626004)(48376002)(5660300001)(5003940100001)(50986999)(2906002)(6862003)(189998001)(42186005)(47776003)(4326007)(33646002)(5001770100001)(6636002)(90966002)(46386002)(36386004)(107986001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR02MB2388;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;PTR:unknown-60-83.xilinx.com;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;SN1NAM02FT020;1:YnTHJd5A2cannt8DqUfFBhMmxY2WFWGIZth1IpUuRzuhnSABLjPlwnKtTFwxOw72gYe+pu9mIdKB+IZy+MpqU2BQri/YwH8bHIcVn95CiHy8Lo+6DSUQRHrVxPQmuxr7E344OJVkufutAUAEpfbjyqeReiwxda6LSqEEQJJZ5EOI6hI01ZWaoEQXC8OXzdaXQNZnUnYt6oTIWfbCi8HWHWNwOpas+Dl4FupNOtkJMbmTIEylIAVjTUiKXJJoPHgwdlJHcVXXlJJWmolg9xIGXXKzEYQyMCYiYbECD4Qwjo66TSmgNbRUnun/qu8plkym1TanlavlVFaQjx0tL7Pbks3bQEh9iEdYZbTZfRF16H/1aFc8Qp2eQqtIBOcPs2BFEIIHf4NyCU6O4Ey7K/D51vNo1I1pwk4Zx5WGHoKp+X1wngJ9/t/9Gez9CnBUp7T0I54i4Ok9Zi7Jd2UvZIp0VkzIerIozODbaAsxsJRV2V66WoOpzojGveQiq00hO2gwRYOcClRUJqdivllaSJb0Y16cAQ6vX2g7jCsdyTsO+KDKwW1Zvtqos3ysNDFGm8mffvLOe/l8cZrMIOZYlq/4qD6kXh3R9+FTKTj34e3MtJ0= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: cfd76770-7f64-41ac-595a-08d416a01473 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(8251501002);SRVR:BN6PR02MB2388; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2388;3:tEqg6IEJdYkgxYwdTk0HD3K0i8V16Ny19cZHFiIWsxdg/jzbujWyPNyUH382cuwmdkOWz7yo/m3HNZzUID9SowVpereoHIVzZWucASqgjEV0dk+VRiRm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IsRRietySlL3syt+082p0zwRmAqW3fGx6qd8NJTKajnIIKEkmh2lfaEEVKaZpFRLLjTPbAtrQNRIyXPkGaxou1KWbV/Ku3s3XKuHkp1Q== X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2388;31:KJFwKuyHDCQ284drciISfmMrCjt7mQopW30N4LYqmDMO7qrumlrn1+l0C2YjApF9DExOLN1tDt3Dq/HmhRZ9GHYoPi/I4jFEUhXsnJDwk5TIs/RfnSWvB46BsDG7ROQPt7qb0SXt+DPOE1xNhJUSePUv5eJWAMOpWc/KxPXFBCO+ZS7hBA0xOFqHqZiAfxpR/MuxNi0yvLulRpSUtZBqCZBFuC25j4F7aFKGmy2Ca27rADe0Y6NLbzqV+/+KphvXR3SXyfPwNSSz5yewumrTvg==;20:vqkPPZFQW0yIEAJc66nveY06Z3wnnIDYIdo6vaDMVqN8hsGjM4vmBCjYwh3jtPHpZrdIhugd8xCpXep9Je2a/uH59K5TxhOkQIT1o/465Hak/LPwXOO8o5zlpj7zHLGP9jH188D6WDe9GyjyUpkyVSVSrd5fRRpBYZbtgVID6ByMP9/xyI44oxz1SGovJ0jedqwQzOVvL1V3mk0VhAQAHhcqUkSDNqjR0LSjdDgXLffV2OQk4IOQxt+OeWGOZopkdRdXqV0RWr7sTnApx8FGxapTf6XAYuH63gDdM2VVuW8j7UH28xPS66DGF1GDXHoHm9pOLjhaPixBtAMdR3BlzhYLDhQLCoq4KR9vDpEP5UawfBQ9HEQZiT6HLECuI9w3YfjQXXESjXt2DACTid0nZrK8OAN4YDdYsN5X/ySzOPKqXehdK4Mb63tf8CSDQATRQzb5yqMYh0uxrCNaVe2GEOhstLLp4jTK8gmQ1JEuaKx7XcaQMDm9+QR8laZSWyLs X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(6040361)(6045199)(601004)(2401047)(13023025)(13017025)(13015025)(13024025)(13018025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6061324)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(20161123558021)(6072148);SRVR:BN6PR02MB2388;BCL:0;PCL:0;RULEID:;SRVR:BN6PR02MB2388; X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2388;4:fjiwQ+ZEqKUY9i+DlL/atohvSeJbxdYtGrbeQlKSAftCm6XJ/ce4E6n39Y2P1Pr/biS9ftvydn85ZZ93OPqFpP9fQ4cNYdCvtRnr1mIPKZQgWqiMO4NWMe1hnm2hiEQhvk7AOQ0MZojn/7t4dolkh70tMbnRlCCnUWc9MCRr0zRkRIQxP1p707brFfrNyrw2C9+R0rXhn4F2hulBKl85SPCUjBZR4yKizH2p9gAnUr2mSSqyWnfY+X0z7OGzHo1EPnApXdj/we979lChic9j2rTXBRIzP0geyFjyuygUUI4HK03Q338TYyl7XuXe1sCi5BaCD2ZEPJzBw1N7Z4rRQIlebT0B2llMe16yGLSrAn48JPySrZe4ASiVRGPWoHz9UPrMSuaVznMm8p9e9rNMzQYVFqRklW6zoTN9E/8qkvzaO5YEGHzJiL3fXYqskO8DN7CEvXk4r2Ph9E1J+WWumXiZj2qcRdjS5NHhLX5SGM2xtrNK265Jf3egaLAIGlABjrVkt29A9T6OMv+dUWko6veqt882D/6dX1C8pMX0JNlYks9hrZrAhdObWmy9NgsOBDGrfprtB5QinC0WlVTIGR/MsZt84DPHUJxatpsv8dcVp6XJLSFriKRc8jSTS4vkFD6S9rwVWZSyvhRqzxkleQZ06mfbD/UzWfmpCCDDAgYdmw10nEPzVvfEyAUfERq+Xg6hXTA+gAyPm+RnJIyg19XoStEMo1e13PinL07EfjxSF2a4BXUoNAaDgLqMlbsUGoiykDqayFsn4BitFkCFL1Jh/QlL5e79K7pcwzlsaIxda1igD7fdPUVzZ6Xw4R2W X-Forefront-PRVS: 0139052FDB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR02MB2388;23:SOJaR+AnysS+W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sP2rnv7brYytnYALUZSCCVmsdmMYukard01u+29Gq4Tb3TF1piTw21i2NpAjXYlyMlaP+raQvb8JHWGNLGHUqCmj4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR02MB2388;7:RSs+O/M1PHG5BFcnnFuUjvPkX7KQPUfoBDdbTRZ80H/+krt5yQYsLk+oMjg7hXGgZ05XpYE6pc0bikbXDOMYf/jf4A9FiHnHUc65PfD6ocblhn0ZNDvDRZfnJ5y6RIMqUz3AY2axR08DZcYr3w73VXAmGZ6i/oIw3EX5lYO9+smfHsqLzQvt0WvclwudcMEC4IOi/NwyD9zqqb9wSIeAWke+RxlSgZdHn0Xbyr0SpJOPPe1Q9patoRQNFPDXJLkATbxgRFfMBFlOlH+E9/3WfpWYrMY+0Leyw4V9R+CRX0TEwSrIRlh37jNHCN/aWcjA9sDyCYiKtV6U8zzOE86d/lSVCm7cmoceZBvvqJcx3yYnnmSdlr8BtVChPBjFf5gWKYvEp5AhALKwx2fNE+ISbiq4a9ctSvMneKbYia43SuS/jyCoy4THP39nChh346mOGMMwbjz4c15L7425sL1s0A== X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2016 08:33:35.7108 (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: BN6PR02MB2388 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1129 Lines: 41 This patch adds struct spi_device instacne to the spi_nor structure. Signed-off-by: Naga Sureshkumar Relli --- Changes for v4: - No change Changes for v3: - No change Changes for v2: - 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(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 9cf7fcd..58cfb42 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -219,6 +219,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 c425c7b..84f3ce5 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -157,6 +157,7 @@ struct spi_nor { struct mtd_info mtd; struct mutex lock; struct device *dev; + struct spi_device *spi; u32 page_size; u8 addr_width; u8 erase_opcode; -- 2.10.2