]> git.baikalelectronics.ru Git - kernel.git/commit
[MTD] Fix !CONFIG_BLOCK compile for mtdsuper.c
authorDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 1 Aug 2008 23:01:21 +0000 (00:01 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sat, 2 Aug 2008 06:52:39 +0000 (07:52 +0100)
commit79650f19f0d57b7b18763fe06a6b3e92f2dd0165
tree459531ff8179263f50494ab040070ea609ebb5ff
parente21bbd7ae2a4383dc27570855ed12132bdf671b3
[MTD] Fix !CONFIG_BLOCK compile for mtdsuper.c

As reported by Adrian Bunk, commit d8e0acd3af4e4bc544e9c427111eb197e6bdb1b0
(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: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdsuper.c