block: have drivers use blk_queue_max_discard_sectors()
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / mtd_blkdevs.c
index 41acc507b22ed942bee2f0df6f43dda073efeb99..1b96cf771d2b53bf50d692b6cd7a53bf5ebf2d8f 100644 (file)
@@ -423,7 +423,7 @@ int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new)
 
        if (tr->discard) {
                queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, new->rq);
-               new->rq->limits.max_discard_sectors = UINT_MAX;
+               blk_queue_max_discard_sectors(new->rq, UINT_MAX);
        }
 
        gd->queue = new->rq;