1
0
Fork 0

mtd: Use mtd->name when registering nvmem device

With this patch, we use the mtd->name instead of concatenating the name
with '0'.

Fixes: c4dfa25ab3 ("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>
hifive-unleashed-5.1
Aneesh Kumar K.V 2019-02-11 19:03:37 +05:30 committed by Boris Brezillon
parent d13937116f
commit 6e9526852f
1 changed files with 1 additions and 0 deletions

View File

@ -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;