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
This commit is contained in:
Christoph Hellwig 2021-08-23 09:33:54 +02:00 committed by Miquel Raynal
parent f214eebf8d
commit ffd18c97fc

View File

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