diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-23 09:33:54 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-08-23 10:01:04 +0200 |
commit | ffd18c97fcb6bf37bb749cfc53c5e698017cbc95 (patch) | |
tree | d5001007564dcb61c36ca976dbacc3e917708cf9 /drivers/mtd/ftl.c | |
parent | f214eebf8de4d2e412a35ff140687d88f056143a (diff) |
mtd/ftl: don't cast away the type when calling add_mtd_blktrans_dev
Pass the actual mtd_blktrans_dev instead of casting the containing
structure to void *.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210823073359.705281-4-hch@lst.de
Diffstat (limited to 'drivers/mtd/ftl.c')
-rw-r--r-- | drivers/mtd/ftl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c index 9b33c082179d..f655d2905270 100644 --- a/drivers/mtd/ftl.c +++ b/drivers/mtd/ftl.c @@ -1029,7 +1029,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) partition->mbd.tr = tr; partition->mbd.devnum = -1; - if (!add_mtd_blktrans_dev((void *)partition)) + if (!add_mtd_blktrans_dev(&partition->mbd)) return; } |