summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/socrates_nand.c
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-12-01 14:03:04 +0300
committerBrian Norris <computersforpeace@gmail.com>2015-12-08 23:24:36 +0300
commit4bd4ebcc540c35d4477b098cf26394f976551464 (patch)
tree2ceb0ef03c53f3f65d881a1d15d2445b602bdb38 /drivers/mtd/nand/socrates_nand.c
parenta83dfa92850e521dfb6485ad4aa3c7c1fb52f06e (diff)
downloadlinux-4bd4ebcc540c35d4477b098cf26394f976551464.tar.xz
mtd: nand: make use of mtd_to_nand() in NAND drivers
mtd_to_nand() was recently introduced to avoid direct accesses to the mtd->priv field. Update all NAND drivers to use it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/socrates_nand.c')
-rw-r--r--drivers/mtd/nand/socrates_nand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c
index bde40433b4d9..2dfb1e0d815a 100644
--- a/drivers/mtd/nand/socrates_nand.c
+++ b/drivers/mtd/nand/socrates_nand.c
@@ -45,7 +45,7 @@ static void socrates_nand_write_buf(struct mtd_info *mtd,
const uint8_t *buf, int len)
{
int i;
- struct nand_chip *this = mtd->priv;
+ struct nand_chip *this = mtd_to_nand(mtd);
struct socrates_nand_host *host = this->priv;
for (i = 0; i < len; i++) {
@@ -64,7 +64,7 @@ static void socrates_nand_write_buf(struct mtd_info *mtd,
static void socrates_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
{
int i;
- struct nand_chip *this = mtd->priv;
+ struct nand_chip *this = mtd_to_nand(mtd);
struct socrates_nand_host *host = this->priv;
uint32_t val;
@@ -105,7 +105,7 @@ static uint16_t socrates_nand_read_word(struct mtd_info *mtd)
static void socrates_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
unsigned int ctrl)
{
- struct nand_chip *nand_chip = mtd->priv;
+ struct nand_chip *nand_chip = mtd_to_nand(mtd);
struct socrates_nand_host *host = nand_chip->priv;
uint32_t val;
@@ -130,7 +130,7 @@ static void socrates_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
*/
static int socrates_nand_device_ready(struct mtd_info *mtd)
{
- struct nand_chip *nand_chip = mtd->priv;
+ struct nand_chip *nand_chip = mtd_to_nand(mtd);
struct socrates_nand_host *host = nand_chip->priv;
if (in_be32(host->io_base) & FPGA_NAND_BUSY)