diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> | 2019-02-11 19:03:37 +0530 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2019-02-13 14:10:22 +0100 |
commit | 6e9526852fad7eb77b7755114951237312258ec7 (patch) | |
tree | d9057d8d657f3c3ac0b09481ccf6692398e2c41b /drivers | |
parent | d13937116f1e82bf508a6325111b322c30c85eb9 (diff) | |
download | linux-6e9526852fad7eb77b7755114951237312258ec7.tar.bz2 |
mtd: Use mtd->name when registering nvmem device
With this patch, we use the mtd->name instead of concatenating the name
with '0'.
Fixes: c4dfa25ab307 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/mtdcore.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 999b705769a8..3ef01baef9b6 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -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; |