From: Thierry Reding Date: Thu, 24 Oct 2013 12:35:47 +0000 (+0200) Subject: Merge remote-tracking branch 'l2-mtd/master' X-Git-Tag: next-20131024~69 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=613ff0d2346a496ffb2491665a496c9389638971;hp=-c;p=karo-tx-linux.git Merge remote-tracking branch 'l2-mtd/master' --- 613ff0d2346a496ffb2491665a496c9389638971 diff --combined drivers/mtd/nand/nandsim.c index 414f5225ae8b,fdcc5bd3c06b..3c6d5c601ade --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@@ -575,12 -575,12 +575,12 @@@ static int alloc_device(struct nandsim cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600); if (IS_ERR(cfile)) return PTR_ERR(cfile); - if (!cfile->f_op || (!cfile->f_op->read && !cfile->f_op->aio_read)) { + if (!file_readable(cfile)) { NS_ERR("alloc_device: cache file not readable\n"); err = -EINVAL; goto err_close; } - if (!cfile->f_op->write && !cfile->f_op->aio_write) { + if (!file_writable(cfile)) { NS_ERR("alloc_device: cache file not writeable\n"); err = -EINVAL; goto err_close; @@@ -2372,7 -2372,7 +2372,7 @@@ static int __init ns_init_module(void if ((retval = init_nandsim(nsmtd)) != 0) goto err_exit; - if ((retval = nand_default_bbt(nsmtd)) != 0) + if ((retval = chip->scan_bbt(nsmtd)) != 0) goto err_exit; if ((retval = parse_badblocks(nand, nsmtd)) != 0)