lkml.org 
[lkml]   [2008]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: mtdsuper.c BLOCK=n compile error
    From
    Date
    On Sat, 2008-08-02 at 01:30 +0300, Adrian Bunk wrote:
    > Commit d5686b444ff3f72808d2b3fbd58672a86cdf38e7
    > (switch mtd and dm-table to lookup_bdev()) causes
    > the following compile error with CONFIG_BLOCK=n:
    >
    > <-- snip -->
    >
    > ...
    > CC drivers/mtd/mtdsuper.o
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtdsuper.c: In function `get_sb_mtd':
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtdsuper.c:184: error: implicit declaration of function 'lookup_bdev'
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtdsuper.c:184: warning: assignment makes pointer from integer without a cast
    > /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/mtd/mtdsuper.c:197: error: implicit declaration of function 'bdput'
    > make[3]: *** [drivers/mtd/mtdsuper.o] Error 1
    >
    > <-- snip -->

    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

    diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c
    index 9b6af7e..e03250b 100644
    --- a/drivers/mtd/mtdsuper.c
    +++ b/drivers/mtd/mtdsuper.c
    @@ -178,6 +178,7 @@ int get_sb_mtd(struct file_system_type *fs_type, int
    flags,
    }
    }

    +#ifdef CONFIG_BLOCK
    /* try the old way - the hack where we allowed users to mount
    * /dev/mtdblock$(n) but didn't actually _use_ the blockdev
    */
    @@ -200,6 +201,7 @@ int get_sb_mtd(struct file_system_type *fs_type, int
    flags,
    mnt);

    not_an_MTD_device:
    +#endif /* CONFIG_BLOCK */
    if (!(flags & MS_SILENT))
    printk(KERN_NOTICE
    "MTD: Attempt to mount non-MTD device \"%s\"\n",
    --
    David Woodhouse Open Source Technology Centre
    David.Woodhouse@intel.com Intel Corporation



    \
     
     \ /
      Last update: 2008-08-02 00:51    [W:0.023 / U:0.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site