summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/docg4.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 11:50:24 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 11:50:24 -0800
commit02f0d3f758ab456c50199b723a53f2443fa4f684 (patch)
tree3898e06a10512a1f6aed5c997b671d8c796cc9e2 /drivers/mtd/nand/docg4.c
parent2d49dcb9e48f65a69281fe4c698c8f1a20215daf (diff)
parentf8479dd6a03cfdc3b14e742045bfd8748cd86bd7 (diff)
Merge tag 'for-linus-20151106' of git://git.infradead.org/linux-mtd
Pull MTD updates from Brian Norris: "Core: - WARN (in some cases) when a struct mtd_info is registered multiple times; in the past this was "supported", but it's still error prone for future development. There's only one ugly case of this left in the tree (that we're aware of) and the owners are aware of the problems there. - fix potential deadlock in the blkdev removal path NOTE: the (potential) deadlock was introduced in a for-stable patch. This one is also marked for -stable. - ioctl(BLKPG) compat_ioctl support; resolves issues with 32-bit user space vs 64-bit kernel space - Set MTD parent device correctly throughout the tree, so the tree structure appears correctly in sysfs; many drivers were missing this (soft) requirement - Move device tree partitions (ofpart) into a dedicated 'partitions' subnode; this helps to disambiguate whether a node is a partition or some other auxiliary data - Improve error handling for partitioning failures NAND: - General: Increase timeout period, for corner-case systems with less-than-accurate jiffies - Fix OF-based autoloading of several NAND drivers when built as modules - pxa3xx_nand: - Rework timing configuration to be more dynamic - Refactor PM support - brcmnand: prepare for NorthStar 2 support (ARM64, 16-bit NAND chips) - sunxi_nand: refactoring and a few bug fixes - vf610: new NAND driver - FSMC: add SW BCH support; support common NAND DT bindings - lpc32xx_slc: refactor and improve timing calculations logic - denali: support for rev 5.1 SPI NOR: - Layering improvements - Added Winbond lock/unlock support - Added mtd_is_locked() (i.e., ioctl(MEMISLOCKED)) support - Increase full-chip-erase timeout linearly with flash size - fsl-quadspi: fix compile for non-ARM architectures - New flash support" * tag 'for-linus-20151106' of git://git.infradead.org/linux-mtd: (169 commits) mtd: don't WARN about overloaded users of mtd->reboot_notifier.notifier_call mtd: nand: sunxi: avoid retrieving data before ECC pass mtd: nand: sunxi: fix sunxi_nfc_hw_ecc_read/write_chunk() mtd: blkdevs: fix potential deadlock + lockdep warnings mtd: ofpart: move ofpart partitions to a dedicated dt node doc: dt: mtd: support partitions in a special 'partitions' subnode mtd: brcmnand: Force 8bit mode before doing nand_scan_ident() mtd: brcmnand: factor out CFG and CFG_EXT bitfields mtd: mtdpart: Do not fail mtd probe when parsing partitions fails mtd: fsl-quadspi: fix macro collision problems with READ/WRITE mtd: warn when registering the same master many times mtd: fixup corner case error handling in mtd_device_parse_register() mtd: tests: Replace timeval with ktime_t mtd: fsmc_nand: Add BCH4 SW ECC support for SPEAr600 mtd: nand: vf610_nfc: use nand_check_erased_ecc_chunk() helper mtd: nand: increase ready wait timeout and report timeouts mtd: docg3: off by one in doc_register_sysfs() mtd: pxa3xx_nand: clean up the pxa3xx timings mtd: pxa3xx_nand: rework flash detection and timing setup mtd: pxa3xx_nand: add helpers to setup the timings ...
Diffstat (limited to 'drivers/mtd/nand/docg4.c')
-rw-r--r--drivers/mtd/nand/docg4.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/docg4.c
index e5d7bcaafa7d..408cf69b854b 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/docg4.c
@@ -977,13 +977,13 @@ static int write_page(struct mtd_info *mtd, struct nand_chip *nand,
}
static int docg4_write_page_raw(struct mtd_info *mtd, struct nand_chip *nand,
- const uint8_t *buf, int oob_required)
+ const uint8_t *buf, int oob_required, int page)
{
return write_page(mtd, nand, buf, false);
}
static int docg4_write_page(struct mtd_info *mtd, struct nand_chip *nand,
- const uint8_t *buf, int oob_required)
+ const uint8_t *buf, int oob_required, int page)
{
return write_page(mtd, nand, buf, true);
}
@@ -1113,7 +1113,7 @@ static int docg4_block_markbad(struct mtd_info *mtd, loff_t ofs)
/* write first page of block */
write_page_prologue(mtd, g4_addr);
- docg4_write_page(mtd, nand, buf, 1);
+ docg4_write_page(mtd, nand, buf, 1, page);
ret = pageprog(mtd);
kfree(buf);
@@ -1316,7 +1316,7 @@ static int __init probe_docg4(struct platform_device *pdev)
doc = (struct docg4_priv *) (nand + 1);
mtd->priv = nand;
nand->priv = doc;
- mtd->owner = THIS_MODULE;
+ mtd->dev.parent = &pdev->dev;
doc->virtadr = virtadr;
doc->dev = dev;