diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-09-14 18:53:26 (GMT) |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2016-09-14 18:53:26 (GMT) |
commit | 16217dc79dbc599b110dda26d0421df47904bba4 (patch) | |
tree | 98df3c18b14284b8a6f8b04de12e0b7dde5a55fa /drivers/mtd/mtd_blkdevs.c | |
parent | ecb3f394c5dba897d215a5422f1b363e93e2ce4e (diff) | |
parent | 723344dd0b2aa10ef9d28fe7f35d594d3e64f0f9 (diff) | |
download | linux-16217dc79dbc599b110dda26d0421df47904bba4.tar.xz |
Merge tag 'irqchip-4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Merge the first drop of irqchip updates for 4.9 from Marc Zyngier:
- ACPI IORT core code
- IORT support for the GICv3 ITS
- A few of GIC cleanups
Diffstat (limited to 'drivers/mtd/mtd_blkdevs.c')
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index 74ae243..8d58acf 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c @@ -87,14 +87,14 @@ static int do_blktrans_request(struct mtd_blktrans_ops *tr, if (req->cmd_type != REQ_TYPE_FS) return -EIO; - if (req->cmd_flags & REQ_FLUSH) + if (req_op(req) == REQ_OP_FLUSH) return tr->flush(dev); if (blk_rq_pos(req) + blk_rq_cur_sectors(req) > get_capacity(req->rq_disk)) return -EIO; - if (req->cmd_flags & REQ_DISCARD) + if (req_op(req) == REQ_OP_DISCARD) return tr->discard(dev, block, nsect); if (rq_data_dir(req) == READ) { @@ -431,12 +431,10 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) goto error4; INIT_WORK(&new->work, mtd_blktrans_work); - gd->driverfs_dev = &new->mtd->dev; - if (new->readonly) set_disk_ro(gd, 1); - add_disk(gd); + device_add_disk(&new->mtd->dev, gd); if (new->disk_attributes) { ret = sysfs_create_group(&disk_to_dev(gd)->kobj, |