Commit dc9cfd2692225a2164f4f20b7deaf38ca8645de3

Authored by Randy Dunlap
Committed by Miquel Raynal
1 parent a55aa89aab

mtd: hyperbus: fix dependency and build error

lib/devres.c, which implements devm_ioremap_resource(), is only built
when CONFIG_HAS_IOMEM is set/enabled, so MTD_HYPERBUS should depend
on HAS_IOMEM.  Fixes a build error and a Kconfig warning (as seen on
UML builds):

WARNING: unmet direct dependencies detected for MTD_COMPLEX_MAPPINGS
  Depends on [n]: MTD [=m] && HAS_IOMEM [=n]
  Selected by [m]:
  - MTD_HYPERBUS [=m] && MTD [=m]

ERROR: "devm_ioremap_resource" [drivers/mtd/hyperbus/hyperbus-core.ko] undefined!

Fixes: dcc7d3446a0f ("mtd: Add support for HyperBus memory devices")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-mtd@lists.infradead.org
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/mtd/hyperbus/Kconfig
1 1 menuconfig MTD_HYPERBUS
2 2 tristate "HyperBus support"
  3 + depends on HAS_IOMEM
3 4 select MTD_CFI
4 5 select MTD_MAP_BANK_WIDTH_2
5 6 select MTD_CFI_AMDSTD