Lines Matching refs:mbd_dev
101 struct mtd_blktrans_dev *mbd_dev; member
1068 hd->info.last_page = d->mbd_dev->size - 1; in mtdswap_auto_header()
1181 mutex_lock(&d->mbd_dev->lock); in mtdswap_show()
1208 pages = d->mbd_dev->size; in mtdswap_show()
1213 mutex_unlock(&d->mbd_dev->lock); in mtdswap_show()
1273 struct mtd_info *mtd = d->mbd_dev->mtd; in mtdswap_init()
1282 pages = d->mbd_dev->size; in mtdswap_init()
1335 struct mtd_blktrans_dev *mbd_dev; in mtdswap_add_mtd() local
1420 mbd_dev = kzalloc(sizeof(struct mtd_blktrans_dev), GFP_KERNEL); in mtdswap_add_mtd()
1421 if (!mbd_dev) { in mtdswap_add_mtd()
1426 d->mbd_dev = mbd_dev; in mtdswap_add_mtd()
1427 mbd_dev->priv = d; in mtdswap_add_mtd()
1429 mbd_dev->mtd = mtd; in mtdswap_add_mtd()
1430 mbd_dev->devnum = mtd->index; in mtdswap_add_mtd()
1431 mbd_dev->size = swap_size >> PAGE_SHIFT; in mtdswap_add_mtd()
1432 mbd_dev->tr = tr; in mtdswap_add_mtd()
1435 mbd_dev->readonly = 1; in mtdswap_add_mtd()
1440 if (add_mtd_blktrans_dev(mbd_dev) < 0) in mtdswap_add_mtd()
1443 d->dev = disk_to_dev(mbd_dev->disk); in mtdswap_add_mtd()
1452 del_mtd_blktrans_dev(mbd_dev); in mtdswap_add_mtd()
1458 kfree(mbd_dev); in mtdswap_add_mtd()