summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-05-17 19:12:18 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-05-17 19:12:18 +0200
commit582078ee3d7dacd74a7b3fe02ea258cadf32b602 (patch)
tree6aa9c20c9df5367782716ef4960e4fac1b9b24ff /drivers/ide/ide-io.c
parent5f582c8e2193e3848039de87e6a3ace7cbc7ed88 (diff)
downloadop-kernel-dev-582078ee3d7dacd74a7b3fe02ea258cadf32b602.zip
op-kernel-dev-582078ee3d7dacd74a7b3fe02ea258cadf32b602.tar.gz
ide: merge ide_disk_special() into do_special() (v2)
While at it: - change debug printk() level to KERN_DEBUG and use __func__ - update documentation v2: - fix DEBUG build (noticed by Sergei) There should be no functional changes caused by this patch. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index ef806ab..1855768 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -184,11 +184,28 @@ static void ide_tf_set_setmult_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
tf->command = ATA_CMD_SET_MULTI;
}
-static ide_startstop_t ide_disk_special(ide_drive_t *drive)
+/**
+ * do_special - issue some special commands
+ * @drive: drive the command is for
+ *
+ * do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS,
+ * ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive.
+ */
+
+static ide_startstop_t do_special(ide_drive_t *drive)
{
special_t *s = &drive->special;
struct ide_cmd cmd;
+#ifdef DEBUG
+ printk(KERN_DEBUG "%s: %s: 0x%02x\n", drive->name, __func__, s->all);
+#endif
+ if (drive->media != ide_disk) {
+ s->all = 0;
+ drive->mult_req = 0;
+ return ide_stopped;
+ }
+
memset(&cmd, 0, sizeof(cmd));
cmd.protocol = ATA_PROT_NODATA;
@@ -213,31 +230,6 @@ static ide_startstop_t ide_disk_special(ide_drive_t *drive)
return ide_started;
}
-/**
- * do_special - issue some special commands
- * @drive: drive the command is for
- *
- * do_special() is used to issue ATA_CMD_INIT_DEV_PARAMS,
- * ATA_CMD_RESTORE and ATA_CMD_SET_MULTI commands to a drive.
- *
- * It used to do much more, but has been scaled back.
- */
-
-static ide_startstop_t do_special (ide_drive_t *drive)
-{
- special_t *s = &drive->special;
-
-#ifdef DEBUG
- printk("%s: do_special: 0x%02x\n", drive->name, s->all);
-#endif
- if (drive->media == ide_disk)
- return ide_disk_special(drive);
-
- s->all = 0;
- drive->mult_req = 0;
- return ide_stopped;
-}
-
void ide_map_sg(ide_drive_t *drive, struct ide_cmd *cmd)
{
ide_hwif_t *hwif = drive->hwif;
OpenPOWER on IntegriCloud