Skip to content

Commit 627e05d

Browse files
committed
ide: remove ->error method from struct ide_driver
* Remove (now superfluous) ->error method from struct ide_driver. * Unexport __ide_error() and make it static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
1 parent 585e971 commit 627e05d

5 files changed

Lines changed: 2 additions & 17 deletions

File tree

‎drivers/ide/ide-cd.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,6 @@ static struct ide_driver ide_cdrom_driver = {
19251925
.version = IDECD_VERSION,
19261926
.do_request = ide_cd_do_request,
19271927
.end_request = ide_end_request,
1928-
.error = __ide_error,
19291928
#ifdef CONFIG_IDE_PROC_FS
19301929
.proc_entries = ide_cd_proc_entries,
19311930
.proc_devsets = ide_cd_proc_devsets,

‎drivers/ide/ide-gd.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ static struct ide_driver ide_gd_driver = {
162162
.version = IDE_GD_VERSION,
163163
.do_request = ide_gd_do_request,
164164
.end_request = ide_gd_end_request,
165-
.error = __ide_error,
166165
#ifdef CONFIG_IDE_PROC_FS
167166
.proc_entries = ide_disk_proc_entries,
168167
.proc_devsets = ide_disk_proc_devsets,

‎drivers/ide/ide-io.c‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,14 @@ static ide_startstop_t ide_atapi_error(ide_drive_t *drive, struct request *rq, u
291291
return ide_stopped;
292292
}
293293

294-
ide_startstop_t
294+
static ide_startstop_t
295295
__ide_error(ide_drive_t *drive, struct request *rq, u8 stat, u8 err)
296296
{
297297
if (drive->media == ide_disk)
298298
return ide_ata_error(drive, rq, stat, err);
299299
return ide_atapi_error(drive, rq, stat, err);
300300
}
301301

302-
EXPORT_SYMBOL_GPL(__ide_error);
303-
304302
/**
305303
* ide_error - handle an error on the IDE
306304
* @drive: drive the error occurred on
@@ -332,15 +330,8 @@ ide_startstop_t ide_error (ide_drive_t *drive, const char *msg, u8 stat)
332330
return ide_stopped;
333331
}
334332

335-
if (rq->rq_disk) {
336-
struct ide_driver *drv;
337-
338-
drv = *(struct ide_driver **)rq->rq_disk->private_data;
339-
return drv->error(drive, rq, stat, err);
340-
} else
341-
return __ide_error(drive, rq, stat, err);
333+
return __ide_error(drive, rq, stat, err);
342334
}
343-
344335
EXPORT_SYMBOL_GPL(ide_error);
345336

346337
static void ide_tf_set_specify_cmd(ide_drive_t *drive, struct ide_taskfile *tf)

‎drivers/ide/ide-tape.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,6 @@ static struct ide_driver idetape_driver = {
23242324
.version = IDETAPE_VERSION,
23252325
.do_request = idetape_do_request,
23262326
.end_request = idetape_end_request,
2327-
.error = __ide_error,
23282327
#ifdef CONFIG_IDE_PROC_FS
23292328
.proc_entries = ide_tape_proc_entries,
23302329
.proc_devsets = ide_tape_proc_devsets,

‎include/linux/ide.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,6 @@ struct ide_driver {
11131113
const char *version;
11141114
ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t);
11151115
int (*end_request)(ide_drive_t *, int, int);
1116-
ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8);
11171116
struct device_driver gen_driver;
11181117
int (*probe)(ide_drive_t *);
11191118
void (*remove)(ide_drive_t *);
@@ -1157,8 +1156,6 @@ void ide_execute_pkt_cmd(ide_drive_t *);
11571156

11581157
void ide_pad_transfer(ide_drive_t *, int, int);
11591158

1160-
ide_startstop_t __ide_error(ide_drive_t *, struct request *, u8, u8);
1161-
11621159
ide_startstop_t ide_error(ide_drive_t *, const char *, u8);
11631160

11641161
void ide_fix_driveid(u16 *);

0 commit comments

Comments
 (0)