Commit d7e48591 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'arm-soc/for-4.5/cleanup' of git://git.infradead.org/linux-mtd into next/cleanup

Merge "MTD/NAND cleanups for v4.5" from Brian Norris:

Two changes for NAND/MTD refactoring. The mtd_to_nand() helper will allow us to
stop using mtd->priv for NAND drivers.

* tag 'arm-soc/for-4.5/cleanup' of git://git.infradead.org/linux-mtd:
  ARM: nand: make use of mtd_to_nand() where appropriate
  mtd: nand: add an mtd_to_nand() helper
parents 4ce52195 c993e095
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@
static void snappercl15_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
				      unsigned int ctrl)
{
	struct nand_chip *chip = mtd->priv;
	struct nand_chip *chip = mtd_to_nand(mtd);
	static u16 nand_state = SNAPPERCL15_NAND_WPN;
	u16 set;

@@ -76,7 +76,7 @@ static void snappercl15_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,

static int snappercl15_nand_dev_ready(struct mtd_info *mtd)
{
	struct nand_chip *chip = mtd->priv;
	struct nand_chip *chip = mtd_to_nand(mtd);

	return !!(__raw_readw(NAND_CTRL_ADDR(chip)) & SNAPPERCL15_NAND_RDY);
}
+2 −2
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static void __init ts72xx_map_io(void)
static void ts72xx_nand_hwcontrol(struct mtd_info *mtd,
				  int cmd, unsigned int ctrl)
{
	struct nand_chip *chip = mtd->priv;
	struct nand_chip *chip = mtd_to_nand(mtd);

	if (ctrl & NAND_CTRL_CHANGE) {
		void __iomem *addr = chip->IO_ADDR_R;
@@ -96,7 +96,7 @@ static void ts72xx_nand_hwcontrol(struct mtd_info *mtd,

static int ts72xx_nand_device_ready(struct mtd_info *mtd)
{
	struct nand_chip *chip = mtd->priv;
	struct nand_chip *chip = mtd_to_nand(mtd);
	void __iomem *addr = chip->IO_ADDR_R;

	addr += (1 << TS72XX_NAND_BUSY_ADDR_LINE);
+1 −1
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ static void qong_init_nor_mtd(void)
 */
static void qong_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);

	if (cmd == NAND_CMD_NONE)
		return;
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static struct mtd_partition ixdp425_partitions[] = {
static void
ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
	struct nand_chip *this = mtd->priv;
	struct nand_chip *this = mtd_to_nand(mtd);
	int offset = (int)this->priv;

	if (ctrl & NAND_CTRL_CHANGE) {
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
{
	struct nand_chip *this = mtd->priv;
	struct nand_chip *this = mtd_to_nand(mtd);
	unsigned long mask;

	if (cmd == NAND_CMD_NONE)
Loading