diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:11:58 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:08 -0500 |
commit | 8c32513bd395dc5d382e4883097482567cf8bbc5 (patch) | |
tree | f603eda2bb0ccf602c88b69e7fb9f6fb6cb947c7 /drivers/scsi/NCR5380.h | |
parent | 270ac2c290ad8b83c92ceeed07aaf49ec5807851 (diff) |
ncr5380: Cleanup host info() methods
If the host->info() method is not set, then host->name is used by default.
For atari_scsi, that is exactly the same text. So remove the redundant
info() method. Keep sun3_scsi.c in line with atari_scsi.
Some NCR5380 drivers return an empty string from the info() method
(arm/cumana_1.c arm/oak.c mac_scsi.c) while other drivers use the default
(dmx3191d dtc.c g_NCR5380.c pas16.c t128.c).
Implement a common info() method to replace a lot of duplicated code which
the various drivers use to announce the same information.
This replaces most of the (deprecated) show_info() output and all of the
NCR5380_print_info() output. This also eliminates a bunch of code in
g_NCR5380 which just duplicates functionality in the core driver.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/NCR5380.h')
-rw-r--r-- | drivers/scsi/NCR5380.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h index d811775ffd9d..dc37da49656b 100644 --- a/drivers/scsi/NCR5380.h +++ b/drivers/scsi/NCR5380.h | |||
@@ -273,6 +273,7 @@ struct NCR5380_hostdata { | |||
273 | volatile Scsi_Cmnd *selecting; | 273 | volatile Scsi_Cmnd *selecting; |
274 | struct delayed_work coroutine; /* our co-routine */ | 274 | struct delayed_work coroutine; /* our co-routine */ |
275 | struct scsi_eh_save ses; | 275 | struct scsi_eh_save ses; |
276 | char info[256]; | ||
276 | }; | 277 | }; |
277 | 278 | ||
278 | #ifdef __KERNEL__ | 279 | #ifdef __KERNEL__ |
@@ -307,7 +308,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance); | |||
307 | static irqreturn_t NCR5380_intr(int irq, void *dev_id); | 308 | static irqreturn_t NCR5380_intr(int irq, void *dev_id); |
308 | #endif | 309 | #endif |
309 | static void NCR5380_main(struct work_struct *work); | 310 | static void NCR5380_main(struct work_struct *work); |
310 | static void __maybe_unused NCR5380_print_options(struct Scsi_Host *instance); | 311 | static const char *NCR5380_info(struct Scsi_Host *instance); |
311 | static void NCR5380_reselect(struct Scsi_Host *instance); | 312 | static void NCR5380_reselect(struct Scsi_Host *instance); |
312 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd); | 313 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd); |
313 | #if defined(PSEUDO_DMA) || defined(REAL_DMA) || defined(REAL_DMA_POLL) | 314 | #if defined(PSEUDO_DMA) || defined(REAL_DMA) || defined(REAL_DMA_POLL) |