Skip to content

Commit

Permalink
ide: remove ->error method from struct ide_driver
Browse files Browse the repository at this point in the history
* Remove (now superfluous) ->error method from struct ide_driver.

* Unexport __ide_error() and make it static.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 6, 2009
1 parent 585e971 commit 627e05d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,6 @@ static struct ide_driver ide_cdrom_driver = {
.version = IDECD_VERSION,
.do_request = ide_cd_do_request,
.end_request = ide_end_request,
.error = __ide_error,
#ifdef CONFIG_IDE_PROC_FS
.proc_entries = ide_cd_proc_entries,
.proc_devsets = ide_cd_proc_devsets,
Expand Down
1 change: 0 additions & 1 deletion drivers/ide/ide-gd.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ static struct ide_driver ide_gd_driver = {
.version = IDE_GD_VERSION,
.do_request = ide_gd_do_request,
.end_request = ide_gd_end_request,
.error = __ide_error,
#ifdef CONFIG_IDE_PROC_FS
.proc_entries = ide_disk_proc_entries,
.proc_devsets = ide_disk_proc_devsets,
Expand Down
13 changes: 2 additions & 11 deletions drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,16 +291,14 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
return ide_stopped;
}

ide_startstop_t
static ide_startstop_t
__ide_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
{
if (drive->media == ide_disk)
return ide_ata_error(drive, rq, stat, err);
return ide_atapi_error(drive, rq, stat, err);
}

EXPORT_SYMBOL_GPL(__ide_error);

/**
* ide_error - handle an error on the IDE
* @drive: drive the error occurred on
Expand Down Expand Up @@ -332,15 +330,8 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
return ide_stopped;
}

if (rq->rq_disk) {
struct ide_driver *drv;

drv = *(struct ide_driver **)rq->rq_disk->private_data;
return drv->error(drive, rq, stat, err);
} else
return __ide_error(drive, rq, stat, err);
return __ide_error(drive, rq, stat, err);
}

EXPORT_SYMBOL_GPL(ide_error);

static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf)
Expand Down
1 change: 0 additions & 1 deletion drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -2324,7 +2324,6 @@ static struct ide_driver idetape_driver = {
.version = IDETAPE_VERSION,
.do_request = idetape_do_request,
.end_request = idetape_end_request,
.error = __ide_error,
#ifdef CONFIG_IDE_PROC_FS
.proc_entries = ide_tape_proc_entries,
.proc_devsets = ide_tape_proc_devsets,
Expand Down
3 changes: 0 additions & 3 deletions include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,6 @@ struct ide_driver {
const char *version;
ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
int (*end_request)(ide_drive_t *, int, int);
ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8);
struct device_driver gen_driver;
int (*probe)(ide_drive_t *);
void (*remove)(ide_drive_t *);
Expand Down Expand Up @@ -1157,8 +1156,6 @@ void ide_execute_pkt_cmd(ide_drive_t *);

void ide_pad_transfer(ide_drive_t *, int, int);

ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);

ide_startstop_t ide_error(ide_drive_t *, const char *, u8);

void ide_fix_driveid(u16 *);
Expand Down

0 comments on commit 627e05d

Please sign in to comment.