linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ranjit.waghmode@xilinx.com (Ranjit Waghmode)
To: linux-arm-kernel@lists.infradead.org
Subject: [LINUX RFC v2 2/4] mtd: add spi_device instance to spi_nor struct
Date: Wed, 26 Aug 2015 11:56:05 +0530	[thread overview]
Message-ID: <1440570367-22569-3-git-send-email-ranjit.waghmode@xilinx.com> (raw)
In-Reply-To: <1440570367-22569-1-git-send-email-ranjit.waghmode@xilinx.com>

This patch adds struct spi_device instacne to the spi_nor structure

Signed-off-by: Ranjit Waghmode <ranjit.waghmode@xilinx.com>
---
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(+)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index d313f948b..174ed0f 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -207,6 +207,7 @@ static int m25p_probe(struct spi_device *spi)
 	spi_set_drvdata(spi, flash);
 	flash->mtd.priv = nor;
 	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 e540952..1705dc3 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -163,6 +163,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.1.2

  parent reply	other threads:[~2015-08-26  6:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26  6:26 [LINUX RFC v2 0/4] spi: add dual parallel mode support in Zynq MPSoC GQSPI controller Ranjit Waghmode
2015-08-26  6:26 ` [LINUX RFC v2 1/4] spi: add support of two chip selects & data stripe Ranjit Waghmode
2015-09-03 12:12   ` Mark Brown
2015-09-04 12:02     ` Ranjit Abhimanyu Waghmode
2015-09-11 12:36       ` Mark Brown
2015-09-11 16:24         ` Harini Katakam
2015-09-04 12:35     ` Martin Sperl
2015-09-04 15:37       ` Mark Brown
2015-09-04 15:48         ` Martin Sperl
2015-08-26  6:26 ` Ranjit Waghmode [this message]
2015-08-26  6:26 ` [LINUX RFC v2 3/4] spi-nor: add dual parallel mode support Ranjit Waghmode
2015-08-26  6:26 ` [LINUX RFC v2 4/4] spi: zynqmp: gqspi: add support for dual parallel mode configuration Ranjit Waghmode
2015-08-26  6:56 ` [LINUX RFC v2 0/4] spi: add dual parallel mode support in Zynq MPSoC GQSPI controller Marek Vasut
2015-09-02 17:12   ` Ranjit Abhimanyu Waghmode
2015-09-02 18:56     ` Marek Vasut
2015-09-03 13:25       ` Ranjit Abhimanyu Waghmode
2015-09-03 13:38         ` Marek Vasut
2015-08-26 12:19 ` Jagan Teki
2015-08-26 15:32   ` punnaiah choudary kalluri
2015-08-27  6:23     ` Jagan Teki
2015-08-27  8:48       ` punnaiah choudary kalluri
2015-08-27 10:15         ` Jagan Teki
2015-08-27 11:49           ` punnaiah choudary kalluri
2015-08-28  4:13             ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440570367-22569-3-git-send-email-ranjit.waghmode@xilinx.com \
    --to=ranjit.waghmode@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).