Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=145b75e9aedbe36c55e45da8564dcd0814bdd89e
Commit:     145b75e9aedbe36c55e45da8564dcd0814bdd89e
Parent:     2624565caacedd740fce7803fe2c162842aa5df4
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 20:13:11 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 20:13:11 2008 +0100

    ide: initialize rq->cmd_type in ide_init_drive_cmd() callers
    
    * Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and
      set_pio_mode() (other callers were aleady over-riding rq->cmd_type).
    
    * Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd().
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-io.c       |    1 -
 drivers/ide/ide-taskfile.c |    4 ++++
 drivers/ide/ide.c          |    3 +++
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 513a568..8c98904 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1672,7 +1672,6 @@ irqreturn_t ide_intr (int irq, void *dev_id)
 void ide_init_drive_cmd (struct request *rq)
 {
        memset(rq, 0, sizeof(*rq));
-       rq->cmd_type = REQ_TYPE_ATA_CMD;
        rq->ref_count = 1;
 }
 
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index b559bec..b8c7e81 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -759,6 +759,7 @@ int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 
feature, u8 sectors,
                buf = buffer;
        memset(buf, 0, 4 + SECTOR_WORDS * 4 * sectors);
        ide_init_drive_cmd(&rq);
+       rq.cmd_type = REQ_TYPE_ATA_CMD;
        rq.buffer = buf;
        *buf++ = cmd;
        *buf++ = nsect;
@@ -778,7 +779,10 @@ int ide_cmd_ioctl (ide_drive_t *drive, unsigned int cmd, 
unsigned long arg)
 
        if (NULL == (void *) arg) {
                struct request rq;
+
                ide_init_drive_cmd(&rq);
+               rq.cmd_type = REQ_TYPE_ATA_CMD;
+
                return ide_do_drive_cmd(drive, &rq, ide_wait);
        }
 
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 52115ef..446b128 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -878,7 +878,10 @@ int set_pio_mode(ide_drive_t *drive, int arg)
 
        if (drive->special.b.set_tune)
                return -EBUSY;
+
        ide_init_drive_cmd(&rq);
+       rq.cmd_type = REQ_TYPE_ATA_CMD;
+
        drive->tune_req = (u8) arg;
        drive->special.b.set_tune = 1;
        (void) ide_do_drive_cmd(drive, &rq, ide_wait);
-
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