diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-12-14 16:13:31 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-12-18 14:24:36 -0800 |
commit | 8142b47ef33c655a34e08efd46b65732fe190675 (patch) | |
tree | 7d44de2a97136ef70c7c42f64ff132ee2d5df581 /drivers/mtd/nand/plat_nand.c | |
parent | 29574ede097438c560e8115caff9b6b8668730be (diff) | |
download | linux-stable-8142b47ef33c655a34e08efd46b65732fe190675.tar.gz linux-stable-8142b47ef33c655a34e08efd46b65732fe190675.tar.bz2 linux-stable-8142b47ef33c655a34e08efd46b65732fe190675.zip |
mtd: nand: remove unused and buggy get_platform_nandchip() helper function
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>
Diffstat (limited to 'drivers/mtd/nand/plat_nand.c')
-rw-r--r-- | drivers/mtd/nand/plat_nand.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index dc88a58d5cde..a0e26dea1424 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c @@ -56,7 +56,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; nand_set_flash_node(&data->chip, pdev->dev.of_node); mtd = nand_to_mtd(&data->chip); mtd->dev.parent = &pdev->dev; |