Skip to content
Commit f1136d02 authored by David Woodhouse's avatar David Woodhouse
Browse files

[MTD] Fix !CONFIG_BLOCK compile for mtdsuper.c

As reported by Adrian Bunk, commit d5686b44


(switch mtd and dm-table to lookup_bdev()) causes the following compile
error with CONFIG_BLOCK=n:

  CC      drivers/mtd/mtdsuper.o
drivers/mtd/mtdsuper.c: In function `get_sb_mtd':
drivers/mtd/mtdsuper.c:184: error: implicit declaration of function 'lookup_bdev'
drivers/mtd/mtdsuper.c:184: warning: assignment makes pointer from integer without a cast
drivers/mtd/mtdsuper.c:197: error: implicit declaration of function 'bdput'
make[3]: *** [drivers/mtd/mtdsuper.o] Error 1

Fix it by putting the block device lookup inside #ifdef CONFIG_BLOCK

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 759da926
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment