Merge branch 'for-3.2/core' of git://git.kernel.dk/linux-block
[pandora-kernel.git] / drivers / mmc / card / queue.c
index 45fb362..dcad59c 100644 (file)
@@ -108,7 +108,7 @@ static void mmc_request(struct request_queue *q)
                wake_up_process(mq->thread);
 }
 
-struct scatterlist *mmc_alloc_sg(int sg_len, int *err)
+static struct scatterlist *mmc_alloc_sg(int sg_len, int *err)
 {
        struct scatterlist *sg;
 
@@ -140,7 +140,7 @@ static void mmc_queue_setup_discard(struct request_queue *q,
        /* granularity must not be greater than max. discard */
        if (card->pref_erase > max_discard)
                q->limits.discard_granularity = 0;
-       if (mmc_can_secure_erase_trim(card))
+       if (mmc_can_secure_erase_trim(card) || mmc_can_sanitize(card))
                queue_flag_set_unlocked(QUEUE_FLAG_SECDISCARD, q);
 }
 
@@ -197,13 +197,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
                if (bouncesz > 512) {
                        mqrq_cur->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
                        if (!mqrq_cur->bounce_buf) {
-                               printk(KERN_WARNING "%s: unable to "
+                               pr_warning("%s: unable to "
                                        "allocate bounce cur buffer\n",
                                        mmc_card_name(card));
                        }
                        mqrq_prev->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
                        if (!mqrq_prev->bounce_buf) {
-                               printk(KERN_WARNING "%s: unable to "
+                               pr_warning("%s: unable to "
                                        "allocate bounce prev buffer\n",
                                        mmc_card_name(card));
                                kfree(mqrq_cur->bounce_buf);