]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'l2-mtd/master'
authorThierry Reding <treding@nvidia.com>
Thu, 24 Oct 2013 12:35:47 +0000 (14:35 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 24 Oct 2013 12:35:47 +0000 (14:35 +0200)
1  2 
drivers/mtd/nand/nandsim.c

index 414f5225ae8b2ece87f1044e6c2a293ae481a773,fdcc5bd3c06bc9c08bd6159ffe58af173645a6d2..3c6d5c601ade269f258175cb8bf740fd10041e09
@@@ -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)