summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-08-23 10:33:54 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-08-23 11:01:04 +0300
commitffd18c97fcb6bf37bb749cfc53c5e698017cbc95 (patch)
treed5001007564dcb61c36ca976dbacc3e917708cf9 /drivers/mtd
parentf214eebf8de4d2e412a35ff140687d88f056143a (diff)
downloadlinux-ffd18c97fcb6bf37bb749cfc53c5e698017cbc95.tar.xz
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')
-rw-r--r--drivers/mtd/ftl.c2
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;
}