mtd: spi-nor: core: Use container_of to get the pointer to struct spi_nor

"struct mtd_info mtd" is member of "struct spi_nor", there's no need
to use "mtd->priv". Get the pointer to the containing struct spi_nor
by using container_of. While here, make the function inline and
get rid of the __maybe_unused.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pratyush Yadav <p.yadav@ti.com>
Link: https://lore.kernel.org/r/20211029172633.886453-3-tudor.ambarus@microchip.com
This commit is contained in:
Tudor Ambarus 2021-10-29 20:26:10 +03:00
commit 7158c86e56
2 changed files with 2 additions and 3 deletions