Skip to content

Commit

Permalink
mtd: Use mtd->name when registering nvmem device
Browse files Browse the repository at this point in the history
With this patch, we use the mtd->name instead of concatenating the name
with '0'.

Fixes: c4dfa25 ("mtd: add support for reading MTD devices via the nvmem API")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
  • Loading branch information
kvaneesh authored and bbrezillon committed Feb 13, 2019
1 parent d139371 commit 6e95268
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
{
struct nvmem_config config = {};

config.id = -1;
config.dev = &mtd->dev;
config.name = mtd->name;
config.owner = THIS_MODULE;
Expand Down

0 comments on commit 6e95268

Please sign in to comment.