summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-floppy.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:34 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:34 +0100
commit5e2040fd0a97888952b37243b5868872bbe0f6ac (patch)
treef7fa199f04ddb17bea362be4b2decb7f276ce869 /drivers/ide/ide-floppy.c
parentbfdb0b3beb0618dd03e7aa49e2fd3ac360aef370 (diff)
downloadlinux-5e2040fd0a97888952b37243b5868872bbe0f6ac.tar.gz
linux-5e2040fd0a97888952b37243b5868872bbe0f6ac.tar.bz2
linux-5e2040fd0a97888952b37243b5868872bbe0f6ac.zip
ide: move ->failed_pc to ide_drive_t
Move ->failed_pc from struct ide_{disk,tape}_obj to ide_drive_t. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r--drivers/ide/ide-floppy.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 6dda0fba017b..f9ad4b3021ee 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -70,7 +70,6 @@
*/
static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs)
{
- struct ide_disk_obj *floppy = drive->driver_data;
struct request *rq = drive->hwif->rq;
int error;
@@ -90,7 +89,7 @@ static int ide_floppy_end_request(ide_drive_t *drive, int uptodate, int nsecs)
}
if (error)
- floppy->failed_pc = NULL;
+ drive->failed_pc = NULL;
if (!blk_special_request(rq)) {
/* our real local end request function */
@@ -121,8 +120,8 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc)
ide_debug_log(IDE_DBG_FUNC, "enter");
- if (floppy->failed_pc == pc)
- floppy->failed_pc = NULL;
+ if (drive->failed_pc == pc)
+ drive->failed_pc = NULL;
if (pc->c[0] == GPCMD_READ_10 || pc->c[0] == GPCMD_WRITE_10 ||
(pc->rq && blk_pc_request(pc->rq)))
@@ -137,9 +136,9 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc)
floppy->progress_indication = buf[15] & 0x80 ?
(u16)get_unaligned((u16 *)&buf[16]) : 0x10000;
- if (floppy->failed_pc)
+ if (drive->failed_pc)
ide_debug_log(IDE_DBG_PC, "pc = %x",
- floppy->failed_pc->c[0]);
+ drive->failed_pc->c[0]);
ide_debug_log(IDE_DBG_SENSE, "sense key = %x, asc = %x,"
"ascq = %x", floppy->sense_key,
@@ -173,9 +172,9 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
{
struct ide_disk_obj *floppy = drive->driver_data;
- if (floppy->failed_pc == NULL &&
+ if (drive->failed_pc == NULL &&
pc->c[0] != GPCMD_REQUEST_SENSE)
- floppy->failed_pc = pc;
+ drive->failed_pc = pc;
/* Set the current packet command */
drive->pc = pc;
@@ -186,7 +185,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
/* Giving up */
pc->error = IDEFLOPPY_ERROR_GENERAL;
- floppy->failed_pc = NULL;
+ drive->failed_pc = NULL;
drive->pc_callback(drive, 0);
return ide_stopped;
}
@@ -290,8 +289,8 @@ static ide_startstop_t ide_floppy_do_request(ide_drive_t *drive,
: "dev?"));
if (rq->errors >= ERROR_MAX) {
- if (floppy->failed_pc)
- ide_floppy_report_error(floppy, floppy->failed_pc);
+ if (drive->failed_pc)
+ ide_floppy_report_error(floppy, drive->failed_pc);
else
printk(KERN_ERR PFX "%s: I/O error\n", drive->name);