aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:44 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-24 18:22:44 -0400
commit11938c929022bb92b1a42f5e1289524a1e465dc0 (patch)
tree7698cdcb8b45d30d7e4831cfa884c1ed13e1fe4c /drivers/ide/ide-io.c
parentc4e66c36cce3f23d68013c4112013123ffe80bdb (diff)
ide: move device settings code to ide-devsets.c
Remove stale comment from ide.c while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 16e47989fcfd..74d1a3e68252 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -490,43 +490,6 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
490 return ide_stopped; 490 return ide_stopped;
491} 491}
492 492
493int ide_devset_execute(ide_drive_t *drive, const struct ide_devset *setting,
494 int arg)
495{
496 struct request_queue *q = drive->queue;
497 struct request *rq;
498 int ret = 0;
499
500 if (!(setting->flags & DS_SYNC))
501 return setting->set(drive, arg);
502
503 rq = blk_get_request(q, READ, __GFP_WAIT);
504 rq->cmd_type = REQ_TYPE_SPECIAL;
505 rq->cmd_len = 5;
506 rq->cmd[0] = REQ_DEVSET_EXEC;
507 *(int *)&rq->cmd[1] = arg;
508 rq->special = setting->set;
509
510 if (blk_execute_rq(q, NULL, rq, 0))
511 ret = rq->errors;
512 blk_put_request(rq);
513
514 return ret;
515}
516
517static ide_startstop_t ide_do_devset(ide_drive_t *drive, struct request *rq)
518{
519 int err, (*setfunc)(ide_drive_t *, int) = rq->special;
520
521 err = setfunc(drive, *(int *)&rq->cmd[1]);
522 if (err)
523 rq->errors = err;
524 else
525 err = 1;
526 ide_end_request(drive, err, 0);
527 return ide_stopped;
528}
529
530static ide_startstop_t ide_special_rq(ide_drive_t *drive, struct request *rq) 493static ide_startstop_t ide_special_rq(ide_drive_t *drive, struct request *rq)
531{ 494{
532 u8 cmd = rq->cmd[0]; 495 u8 cmd = rq->cmd[0];