lkml.org 
[lkml]   [2008]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 17/18] ide-floppy: cleanup idefloppy_create_rw_cmd
    Date
    From
    There should be no functionality change introduced by this patch.

    Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
    ---
    drivers/ide/ide-floppy.c | 7 ++++---
    1 files changed, 4 insertions(+), 3 deletions(-)

    diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
    index 1ec4951..8bdef60 100644
    --- a/drivers/ide/ide-floppy.c
    +++ b/drivers/ide/ide-floppy.c
    @@ -576,8 +576,7 @@ static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,
    int blocks = rq->nr_sectors / floppy->bs_factor;
    int rw_dir = rq_data_dir(rq);

    - debug_log("create_rw10_cmd: block == %d, blocks == %d\n",
    - block, blocks);
    + debug_log("%s: block == %d, blocks == %d\n", __func__, block, blocks);

    idefloppy_init_pc(pc, NULL);
    rq->cmd[0] = rw_dir == READ ? GPCMD_READ_10 : GPCMD_WRITE_10;
    @@ -586,8 +585,10 @@ static void idefloppy_create_rw_cmd(idefloppy_floppy_t *floppy,

    pc->rq = rq;
    pc->b_count = rw_dir == READ ? 0 : rq->bio->bi_size;
    - if (rq->cmd_flags & REQ_RW)
    +
    + if (rw_dir)
    pc->flags |= PC_FLAG_WRITING;
    +
    pc->buf = NULL;
    pc->req_xfer = pc->buf_size = blocks * floppy->block_size;
    pc->flags |= PC_FLAG_DMA_OK;
    --
    1.5.5.1


    \
     
     \ /
      Last update: 2008-06-12 08:47    [W:0.021 / U:0.520 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site