summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-12-14 16:13:31 +0100
committerLuis Henriques <luis.henriques@canonical.com>2016-02-02 19:35:00 +0000
commitf1b1b603033d86883b8c0cfd591d1ac93c680e5c (patch)
treecd4cdc68c9ff7ef3272b65154020dc51df559684 /drivers/mtd
parent82a58175ceda33ca4dba2249a4ced794f177ac39 (diff)
downloadlinux-stable-f1b1b603033d86883b8c0cfd591d1ac93c680e5c.tar.gz
linux-stable-f1b1b603033d86883b8c0cfd591d1ac93c680e5c.tar.bz2
linux-stable-f1b1b603033d86883b8c0cfd591d1ac93c680e5c.zip
mtd: nand: remove unused and buggy get_platform_nandchip() helper function
commit 8142b47ef33c655a34e08efd46b65732fe190675 upstream. Nobody uses the get_platform_nandchip() helper function which is supposed to return a pointer to a platform_nand_chip struct from an mtd_info pointer. Moreover, this function is buggy since the introduction of the plat_nand layer (chip->priv is now storing a pointer to an intermediate plat_nand_data structure allocated in plat_nand_probe(), and we have no way to retrieve a pointer to the provided platform_nand_chip struct from this plat_nand_data pointer). While we are at it, remove the useless (and buggy, since it's pointing to something stored on the stack) data->chip.priv assignment. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: 711fdf627ce1 ("[MTD] [NAND] platform NAND driver: add driver") Cc: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> [ luis: backported to 3.16: adjusted context ] Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/plat_nand.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 0b068a5c0bff..d6fe74f5f208 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -59,7 +59,6 @@ static int plat_nand_probe(struct platform_device *pdev)
if (IS_ERR(data->io_base))
return PTR_ERR(data->io_base);
- data->chip.priv = &data;
data->mtd.priv = &data->chip;
data->mtd.owner = THIS_MODULE;
data->mtd.name = dev_name(&pdev->dev);