Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c9f2d63a77325bc050e4ed9255ee8270c067d1a
Commit:     9c9f2d63a77325bc050e4ed9255ee8270c067d1a
Parent:     585a2858b970cb6e2e5ca4877eefd18b4dba8ed4
Author:     Pierre Ossman <[EMAIL PROTECTED]>
AuthorDate: Wed May 16 17:29:21 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Thu May 24 06:51:02 2007 +0200

    mmc: clean up unused parts of block driver
    
    Remove dead code and unused structs from the block driver.
    
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/card/block.c |   18 ------------------
 drivers/mmc/card/queue.c |   35 ++++++++---------------------------
 drivers/mmc/card/queue.h |    8 --------
 3 files changed, 8 insertions(+), 53 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index a7562f7..540ff4b 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -135,23 +135,6 @@ struct mmc_blk_request {
        struct mmc_data         data;
 };
 
-static int mmc_blk_prep_rq(struct mmc_queue *mq, struct request *req)
-{
-       struct mmc_blk_data *md = mq->data;
-       int stat = BLKPREP_OK;
-
-       /*
-        * If we have no device, we haven't finished initialising.
-        */
-       if (!md || !mq->card) {
-               printk(KERN_ERR "%s: killing request - no device/host\n",
-                      req->rq_disk->disk_name);
-               stat = BLKPREP_KILL;
-       }
-
-       return stat;
-}
-
 static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
 {
        int err;
@@ -460,7 +443,6 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card 
*card)
        if (ret)
                goto err_putdisk;
 
-       md->queue.prep_fn = mmc_blk_prep_rq;
        md->queue.issue_fn = mmc_blk_issue_rq;
        md->queue.data = md;
 
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 2e77963..dd97bc7 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -20,40 +20,21 @@
 #define MMC_QUEUE_SUSPENDED    (1 << 0)
 
 /*
- * Prepare a MMC request.  Essentially, this means passing the
- * preparation off to the media driver.  The media driver will
- * create a mmc_io_request in req->special.
+ * Prepare a MMC request. This just filters out odd stuff.
  */
 static int mmc_prep_request(struct request_queue *q, struct request *req)
 {
-       struct mmc_queue *mq = q->queuedata;
-       int ret = BLKPREP_KILL;
-
-       if (blk_special_request(req)) {
-               /*
-                * Special commands already have the command
-                * blocks already setup in req->special.
-                */
-               BUG_ON(!req->special);
-
-               ret = BLKPREP_OK;
-       } else if (blk_fs_request(req) || blk_pc_request(req)) {
-               /*
-                * Block I/O requests need translating according
-                * to the protocol.
-                */
-               ret = mq->prep_fn(mq, req);
-       } else {
-               /*
-                * Everything else is invalid.
-                */
+       /*
+        * We only like normal block requests.
+        */
+       if (!blk_fs_request(req) && !blk_pc_request(req)) {
                blk_dump_rq_flags(req, "MMC bad request");
+               return BLKPREP_KILL;
        }
 
-       if (ret == BLKPREP_OK)
-               req->cmd_flags |= REQ_DONTPREP;
+       req->cmd_flags |= REQ_DONTPREP;
 
-       return ret;
+       return BLKPREP_OK;
 }
 
 static int mmc_queue_thread(void *d)
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
index c9f139e..1590b3f 100644
--- a/drivers/mmc/card/queue.h
+++ b/drivers/mmc/card/queue.h
@@ -10,20 +10,12 @@ struct mmc_queue {
        struct semaphore        thread_sem;
        unsigned int            flags;
        struct request          *req;
-       int                     (*prep_fn)(struct mmc_queue *, struct request 
*);
        int                     (*issue_fn)(struct mmc_queue *, struct request 
*);
        void                    *data;
        struct request_queue    *queue;
        struct scatterlist      *sg;
 };
 
-struct mmc_io_request {
-       struct request          *rq;
-       int                     num;
-       struct mmc_command      selcmd;         /* mmc_queue private */
-       struct mmc_command      cmd[4];         /* max 4 commands */
-};
-
 extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *);
 extern void mmc_cleanup_queue(struct mmc_queue *);
 extern void mmc_queue_suspend(struct mmc_queue *);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to