mmc: queue: append partition subname to queue thread name
[deliverable/linux.git] / drivers / mmc / card / queue.c
index 2ae727568df92b9edeaf330ea46751d6e0493474..3e2db1cf1cbbed8ecef23e3ba52e1a4652f01ca3 100644 (file)
@@ -106,10 +106,12 @@ static void mmc_request(struct request_queue *q)
  * @mq: mmc queue
  * @card: mmc card to attach this queue
  * @lock: queue lock
+ * @subname: partition subname
  *
  * Initialise a MMC card request queue.
  */
-int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock)
+int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
+                  spinlock_t *lock, const char *subname)
 {
        struct mmc_host *host = card->host;
        u64 limit = BLK_BOUNCE_HIGH;
@@ -209,8 +211,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
 
        sema_init(&mq->thread_sem, 1);
 
-       mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d",
-               host->index);
+       mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d%s",
+               host->index, subname ? subname : "");
 
        if (IS_ERR(mq->thread)) {
                ret = PTR_ERR(mq->thread);
@@ -343,18 +345,14 @@ unsigned int mmc_queue_map_sg(struct mmc_queue *mq)
  */
 void mmc_queue_bounce_pre(struct mmc_queue *mq)
 {
-       unsigned long flags;
-
        if (!mq->bounce_buf)
                return;
 
        if (rq_data_dir(mq->req) != WRITE)
                return;
 
-       local_irq_save(flags);
        sg_copy_to_buffer(mq->bounce_sg, mq->bounce_sg_len,
                mq->bounce_buf, mq->sg[0].length);
-       local_irq_restore(flags);
 }
 
 /*
@@ -363,17 +361,13 @@ void mmc_queue_bounce_pre(struct mmc_queue *mq)
  */
 void mmc_queue_bounce_post(struct mmc_queue *mq)
 {
-       unsigned long flags;
-
        if (!mq->bounce_buf)
                return;
 
        if (rq_data_dir(mq->req) != READ)
                return;
 
-       local_irq_save(flags);
        sg_copy_from_buffer(mq->bounce_sg, mq->bounce_sg_len,
                mq->bounce_buf, mq->sg[0].length);
-       local_irq_restore(flags);
 }
 
This page took 0.029665 seconds and 5 git commands to generate.