Commit 4d17a892 authored by Boris BREZILLON's avatar Boris BREZILLON Committed by Brian Norris

blackfin: nand: make use of mtd_to_nand() where appropriate

mtd_to_nand() was recently introduced to avoid direct accesses to the
mtd->priv field. Update all blackfin specific implementations to use
this helper.
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 9eba47dd
...@@ -404,7 +404,7 @@ static struct mtd_partition bfin_plat_nand_partitions[] = { ...@@ -404,7 +404,7 @@ static struct mtd_partition bfin_plat_nand_partitions[] = {
#define BFIN_NAND_PLAT_ALE 1 #define BFIN_NAND_PLAT_ALE 1
static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) static void bfin_plat_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);
if (cmd == NAND_CMD_NONE) if (cmd == NAND_CMD_NONE)
return; return;
......
...@@ -267,7 +267,7 @@ static struct mtd_partition bfin_plat_nand_partitions[] = { ...@@ -267,7 +267,7 @@ static struct mtd_partition bfin_plat_nand_partitions[] = {
static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd,
unsigned int ctrl) unsigned int ctrl)
{ {
struct nand_chip *this = mtd->priv; struct nand_chip *this = mtd_to_nand(mtd);
if (cmd == NAND_CMD_NONE) if (cmd == NAND_CMD_NONE)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment