diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2008-04-24 22:36:01 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-27 13:20:00 -0400 |
commit | 980b306a297725d4f25c779ca15086de757acadf (patch) | |
tree | 74a8c1482fa49eaec5100438c75735cab83adf2a /drivers | |
parent | d1d7b19d433188e94fc87cc7ca66363cd77a0bba (diff) |
[SCSI] aic7xxx: add const
This patch adds more const keywords where appropriate.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx.h | 6 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_core.c | 28 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 18 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm_pci.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_pci.c | 8 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_proc.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx.h | 6 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_93cx6.c | 16 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_core.c | 12 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 12 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_pci.c | 9 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_proc.c | 2 |
13 files changed, 61 insertions, 66 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx.h b/drivers/scsi/aic7xxx/aic79xx.h index 9c1484453d5f..be5558ab84ea 100644 --- a/drivers/scsi/aic7xxx/aic79xx.h +++ b/drivers/scsi/aic7xxx/aic79xx.h | |||
@@ -815,7 +815,7 @@ struct ahd_tmode_tstate { | |||
815 | struct ahd_phase_table_entry { | 815 | struct ahd_phase_table_entry { |
816 | uint8_t phase; | 816 | uint8_t phase; |
817 | uint8_t mesg_out; /* Message response to parity errors */ | 817 | uint8_t mesg_out; /* Message response to parity errors */ |
818 | char *phasemsg; | 818 | const char *phasemsg; |
819 | }; | 819 | }; |
820 | 820 | ||
821 | /************************** Serial EEPROM Format ******************************/ | 821 | /************************** Serial EEPROM Format ******************************/ |
@@ -1335,9 +1335,9 @@ extern const int ahd_num_aic7770_devs; | |||
1335 | /******************************************************************************/ | 1335 | /******************************************************************************/ |
1336 | 1336 | ||
1337 | /***************************** PCI Front End *********************************/ | 1337 | /***************************** PCI Front End *********************************/ |
1338 | struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t); | 1338 | const struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t); |
1339 | int ahd_pci_config(struct ahd_softc *, | 1339 | int ahd_pci_config(struct ahd_softc *, |
1340 | struct ahd_pci_identity *); | 1340 | const struct ahd_pci_identity *); |
1341 | int ahd_pci_test_register_access(struct ahd_softc *); | 1341 | int ahd_pci_test_register_access(struct ahd_softc *); |
1342 | #ifdef CONFIG_PM | 1342 | #ifdef CONFIG_PM |
1343 | void ahd_pci_suspend(struct ahd_softc *); | 1343 | void ahd_pci_suspend(struct ahd_softc *); |
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c index 1e452cfa2390..55508b0fcec4 100644 --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c | |||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | 53 | ||
54 | /***************************** Lookup Tables **********************************/ | 54 | /***************************** Lookup Tables **********************************/ |
55 | static char *ahd_chip_names[] = | 55 | static const char *const ahd_chip_names[] = |
56 | { | 56 | { |
57 | "NONE", | 57 | "NONE", |
58 | "aic7901", | 58 | "aic7901", |
@@ -66,10 +66,10 @@ static const u_int num_chip_names = ARRAY_SIZE(ahd_chip_names); | |||
66 | */ | 66 | */ |
67 | struct ahd_hard_error_entry { | 67 | struct ahd_hard_error_entry { |
68 | uint8_t errno; | 68 | uint8_t errno; |
69 | char *errmesg; | 69 | const char *errmesg; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | static struct ahd_hard_error_entry ahd_hard_errors[] = { | 72 | static const struct ahd_hard_error_entry ahd_hard_errors[] = { |
73 | { DSCTMOUT, "Discard Timer has timed out" }, | 73 | { DSCTMOUT, "Discard Timer has timed out" }, |
74 | { ILLOPCODE, "Illegal Opcode in sequencer program" }, | 74 | { ILLOPCODE, "Illegal Opcode in sequencer program" }, |
75 | { SQPARERR, "Sequencer Parity Error" }, | 75 | { SQPARERR, "Sequencer Parity Error" }, |
@@ -79,7 +79,7 @@ static struct ahd_hard_error_entry ahd_hard_errors[] = { | |||
79 | }; | 79 | }; |
80 | static const u_int num_errors = ARRAY_SIZE(ahd_hard_errors); | 80 | static const u_int num_errors = ARRAY_SIZE(ahd_hard_errors); |
81 | 81 | ||
82 | static struct ahd_phase_table_entry ahd_phase_table[] = | 82 | static const struct ahd_phase_table_entry ahd_phase_table[] = |
83 | { | 83 | { |
84 | { P_DATAOUT, MSG_NOOP, "in Data-out phase" }, | 84 | { P_DATAOUT, MSG_NOOP, "in Data-out phase" }, |
85 | { P_DATAIN, MSG_INITIATOR_DET_ERR, "in Data-in phase" }, | 85 | { P_DATAIN, MSG_INITIATOR_DET_ERR, "in Data-in phase" }, |
@@ -213,7 +213,7 @@ static void ahd_dumpseq(struct ahd_softc *ahd); | |||
213 | #endif | 213 | #endif |
214 | static void ahd_loadseq(struct ahd_softc *ahd); | 214 | static void ahd_loadseq(struct ahd_softc *ahd); |
215 | static int ahd_check_patch(struct ahd_softc *ahd, | 215 | static int ahd_check_patch(struct ahd_softc *ahd, |
216 | struct patch **start_patch, | 216 | const struct patch **start_patch, |
217 | u_int start_instr, u_int *skip_addr); | 217 | u_int start_instr, u_int *skip_addr); |
218 | static u_int ahd_resolve_seqaddr(struct ahd_softc *ahd, | 218 | static u_int ahd_resolve_seqaddr(struct ahd_softc *ahd, |
219 | u_int address); | 219 | u_int address); |
@@ -254,7 +254,7 @@ static void ahd_freeze_devq(struct ahd_softc *ahd, | |||
254 | struct scb *scb); | 254 | struct scb *scb); |
255 | static void ahd_handle_scb_status(struct ahd_softc *ahd, | 255 | static void ahd_handle_scb_status(struct ahd_softc *ahd, |
256 | struct scb *scb); | 256 | struct scb *scb); |
257 | static struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase); | 257 | static const struct ahd_phase_table_entry* ahd_lookup_phase_entry(int phase); |
258 | static void ahd_shutdown(void *arg); | 258 | static void ahd_shutdown(void *arg); |
259 | static void ahd_update_coalescing_values(struct ahd_softc *ahd, | 259 | static void ahd_update_coalescing_values(struct ahd_softc *ahd, |
260 | u_int timer, | 260 | u_int timer, |
@@ -4337,11 +4337,11 @@ ahd_print_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) | |||
4337 | devinfo->target, devinfo->lun); | 4337 | devinfo->target, devinfo->lun); |
4338 | } | 4338 | } |
4339 | 4339 | ||
4340 | static struct ahd_phase_table_entry* | 4340 | static const struct ahd_phase_table_entry* |
4341 | ahd_lookup_phase_entry(int phase) | 4341 | ahd_lookup_phase_entry(int phase) |
4342 | { | 4342 | { |
4343 | struct ahd_phase_table_entry *entry; | 4343 | const struct ahd_phase_table_entry *entry; |
4344 | struct ahd_phase_table_entry *last_entry; | 4344 | const struct ahd_phase_table_entry *last_entry; |
4345 | 4345 | ||
4346 | /* | 4346 | /* |
4347 | * num_phases doesn't include the default entry which | 4347 | * num_phases doesn't include the default entry which |
@@ -9354,7 +9354,7 @@ ahd_loadseq(struct ahd_softc *ahd) | |||
9354 | struct cs cs_table[num_critical_sections]; | 9354 | struct cs cs_table[num_critical_sections]; |
9355 | u_int begin_set[num_critical_sections]; | 9355 | u_int begin_set[num_critical_sections]; |
9356 | u_int end_set[num_critical_sections]; | 9356 | u_int end_set[num_critical_sections]; |
9357 | struct patch *cur_patch; | 9357 | const struct patch *cur_patch; |
9358 | u_int cs_count; | 9358 | u_int cs_count; |
9359 | u_int cur_cs; | 9359 | u_int cur_cs; |
9360 | u_int i; | 9360 | u_int i; |
@@ -9509,11 +9509,11 @@ ahd_loadseq(struct ahd_softc *ahd) | |||
9509 | } | 9509 | } |
9510 | 9510 | ||
9511 | static int | 9511 | static int |
9512 | ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch, | 9512 | ahd_check_patch(struct ahd_softc *ahd, const struct patch **start_patch, |
9513 | u_int start_instr, u_int *skip_addr) | 9513 | u_int start_instr, u_int *skip_addr) |
9514 | { | 9514 | { |
9515 | struct patch *cur_patch; | 9515 | const struct patch *cur_patch; |
9516 | struct patch *last_patch; | 9516 | const struct patch *last_patch; |
9517 | u_int num_patches; | 9517 | u_int num_patches; |
9518 | 9518 | ||
9519 | num_patches = ARRAY_SIZE(patches); | 9519 | num_patches = ARRAY_SIZE(patches); |
@@ -9547,7 +9547,7 @@ ahd_check_patch(struct ahd_softc *ahd, struct patch **start_patch, | |||
9547 | static u_int | 9547 | static u_int |
9548 | ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address) | 9548 | ahd_resolve_seqaddr(struct ahd_softc *ahd, u_int address) |
9549 | { | 9549 | { |
9550 | struct patch *cur_patch; | 9550 | const struct patch *cur_patch; |
9551 | int address_offset; | 9551 | int address_offset; |
9552 | u_int skip_addr; | 9552 | u_int skip_addr; |
9553 | u_int i; | 9553 | u_int i; |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index ea0bbda47324..0f829b3b8ab7 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -193,7 +193,7 @@ struct ahd_linux_iocell_opts | |||
193 | #define AIC79XX_PRECOMP_INDEX 0 | 193 | #define AIC79XX_PRECOMP_INDEX 0 |
194 | #define AIC79XX_SLEWRATE_INDEX 1 | 194 | #define AIC79XX_SLEWRATE_INDEX 1 |
195 | #define AIC79XX_AMPLITUDE_INDEX 2 | 195 | #define AIC79XX_AMPLITUDE_INDEX 2 |
196 | static struct ahd_linux_iocell_opts aic79xx_iocell_info[] = | 196 | static const struct ahd_linux_iocell_opts aic79xx_iocell_info[] = |
197 | { | 197 | { |
198 | AIC79XX_DEFAULT_IOOPTS, | 198 | AIC79XX_DEFAULT_IOOPTS, |
199 | AIC79XX_DEFAULT_IOOPTS, | 199 | AIC79XX_DEFAULT_IOOPTS, |
@@ -557,13 +557,11 @@ ahd_linux_info(struct Scsi_Host *host) | |||
557 | bp = &buffer[0]; | 557 | bp = &buffer[0]; |
558 | ahd = *(struct ahd_softc **)host->hostdata; | 558 | ahd = *(struct ahd_softc **)host->hostdata; |
559 | memset(bp, 0, sizeof(buffer)); | 559 | memset(bp, 0, sizeof(buffer)); |
560 | strcpy(bp, "Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev "); | 560 | strcpy(bp, "Adaptec AIC79XX PCI-X SCSI HBA DRIVER, Rev " AIC79XX_DRIVER_VERSION "\n" |
561 | strcat(bp, AIC79XX_DRIVER_VERSION); | 561 | " <"); |
562 | strcat(bp, "\n"); | ||
563 | strcat(bp, " <"); | ||
564 | strcat(bp, ahd->description); | 562 | strcat(bp, ahd->description); |
565 | strcat(bp, ">\n"); | 563 | strcat(bp, ">\n" |
566 | strcat(bp, " "); | 564 | " "); |
567 | ahd_controller_info(ahd, ahd_info); | 565 | ahd_controller_info(ahd, ahd_info); |
568 | strcat(bp, ahd_info); | 566 | strcat(bp, ahd_info); |
569 | 567 | ||
@@ -1148,7 +1146,7 @@ aic79xx_setup(char *s) | |||
1148 | char *p; | 1146 | char *p; |
1149 | char *end; | 1147 | char *end; |
1150 | 1148 | ||
1151 | static struct { | 1149 | static const struct { |
1152 | const char *name; | 1150 | const char *name; |
1153 | uint32_t *flag; | 1151 | uint32_t *flag; |
1154 | } options[] = { | 1152 | } options[] = { |
@@ -1380,7 +1378,7 @@ ahd_platform_init(struct ahd_softc *ahd) | |||
1380 | * Lookup and commit any modified IO Cell options. | 1378 | * Lookup and commit any modified IO Cell options. |
1381 | */ | 1379 | */ |
1382 | if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { | 1380 | if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { |
1383 | struct ahd_linux_iocell_opts *iocell_opts; | 1381 | const struct ahd_linux_iocell_opts *iocell_opts; |
1384 | 1382 | ||
1385 | iocell_opts = &aic79xx_iocell_info[ahd->unit]; | 1383 | iocell_opts = &aic79xx_iocell_info[ahd->unit]; |
1386 | if (iocell_opts->precomp != AIC79XX_DEFAULT_PRECOMP) | 1384 | if (iocell_opts->precomp != AIC79XX_DEFAULT_PRECOMP) |
@@ -2770,7 +2768,7 @@ static void ahd_linux_set_pcomp_en(struct scsi_target *starget, int pcomp) | |||
2770 | uint8_t precomp; | 2768 | uint8_t precomp; |
2771 | 2769 | ||
2772 | if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { | 2770 | if (ahd->unit < ARRAY_SIZE(aic79xx_iocell_info)) { |
2773 | struct ahd_linux_iocell_opts *iocell_opts; | 2771 | const struct ahd_linux_iocell_opts *iocell_opts; |
2774 | 2772 | ||
2775 | iocell_opts = &aic79xx_iocell_info[ahd->unit]; | 2773 | iocell_opts = &aic79xx_iocell_info[ahd->unit]; |
2776 | precomp = iocell_opts->precomp; | 2774 | precomp = iocell_opts->precomp; |
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c index 9e0d7bdc889e..6593056867f6 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c | |||
@@ -49,7 +49,7 @@ | |||
49 | ID2C(x), \ | 49 | ID2C(x), \ |
50 | ID2C(IDIROC(x)) | 50 | ID2C(IDIROC(x)) |
51 | 51 | ||
52 | static struct pci_device_id ahd_linux_pci_id_table[] = { | 52 | static const struct pci_device_id ahd_linux_pci_id_table[] = { |
53 | /* aic7901 based controllers */ | 53 | /* aic7901 based controllers */ |
54 | ID(ID_AHA_29320A), | 54 | ID(ID_AHA_29320A), |
55 | ID(ID_AHA_29320ALP), | 55 | ID(ID_AHA_29320ALP), |
@@ -159,7 +159,7 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
159 | char buf[80]; | 159 | char buf[80]; |
160 | struct ahd_softc *ahd; | 160 | struct ahd_softc *ahd; |
161 | ahd_dev_softc_t pci; | 161 | ahd_dev_softc_t pci; |
162 | struct ahd_pci_identity *entry; | 162 | const struct ahd_pci_identity *entry; |
163 | char *name; | 163 | char *name; |
164 | int error; | 164 | int error; |
165 | struct device *dev = &pdev->dev; | 165 | struct device *dev = &pdev->dev; |
diff --git a/drivers/scsi/aic7xxx/aic79xx_pci.c b/drivers/scsi/aic7xxx/aic79xx_pci.c index 0bb352573f57..c25b6adffbf9 100644 --- a/drivers/scsi/aic7xxx/aic79xx_pci.c +++ b/drivers/scsi/aic7xxx/aic79xx_pci.c | |||
@@ -97,7 +97,7 @@ static ahd_device_setup_t ahd_aic7901A_setup; | |||
97 | static ahd_device_setup_t ahd_aic7902_setup; | 97 | static ahd_device_setup_t ahd_aic7902_setup; |
98 | static ahd_device_setup_t ahd_aic790X_setup; | 98 | static ahd_device_setup_t ahd_aic790X_setup; |
99 | 99 | ||
100 | static struct ahd_pci_identity ahd_pci_ident_table[] = | 100 | static const struct ahd_pci_identity ahd_pci_ident_table[] = |
101 | { | 101 | { |
102 | /* aic7901 based controllers */ | 102 | /* aic7901 based controllers */ |
103 | { | 103 | { |
@@ -253,7 +253,7 @@ static void ahd_configure_termination(struct ahd_softc *ahd, | |||
253 | static void ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat); | 253 | static void ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat); |
254 | static void ahd_pci_intr(struct ahd_softc *ahd); | 254 | static void ahd_pci_intr(struct ahd_softc *ahd); |
255 | 255 | ||
256 | struct ahd_pci_identity * | 256 | const struct ahd_pci_identity * |
257 | ahd_find_pci_device(ahd_dev_softc_t pci) | 257 | ahd_find_pci_device(ahd_dev_softc_t pci) |
258 | { | 258 | { |
259 | uint64_t full_id; | 259 | uint64_t full_id; |
@@ -261,7 +261,7 @@ ahd_find_pci_device(ahd_dev_softc_t pci) | |||
261 | uint16_t vendor; | 261 | uint16_t vendor; |
262 | uint16_t subdevice; | 262 | uint16_t subdevice; |
263 | uint16_t subvendor; | 263 | uint16_t subvendor; |
264 | struct ahd_pci_identity *entry; | 264 | const struct ahd_pci_identity *entry; |
265 | u_int i; | 265 | u_int i; |
266 | 266 | ||
267 | vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); | 267 | vendor = ahd_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); |
@@ -292,7 +292,7 @@ ahd_find_pci_device(ahd_dev_softc_t pci) | |||
292 | } | 292 | } |
293 | 293 | ||
294 | int | 294 | int |
295 | ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) | 295 | ahd_pci_config(struct ahd_softc *ahd, const struct ahd_pci_identity *entry) |
296 | { | 296 | { |
297 | struct scb_data *shared_scb_data; | 297 | struct scb_data *shared_scb_data; |
298 | u_int command; | 298 | u_int command; |
diff --git a/drivers/scsi/aic7xxx/aic79xx_proc.c b/drivers/scsi/aic7xxx/aic79xx_proc.c index 6b28bebcbca0..014bed716e7c 100644 --- a/drivers/scsi/aic7xxx/aic79xx_proc.c +++ b/drivers/scsi/aic7xxx/aic79xx_proc.c | |||
@@ -57,7 +57,7 @@ static int ahd_proc_write_seeprom(struct ahd_softc *ahd, | |||
57 | * Table of syncrates that don't follow the "divisible by 4" | 57 | * Table of syncrates that don't follow the "divisible by 4" |
58 | * rule. This table will be expanded in future SCSI specs. | 58 | * rule. This table will be expanded in future SCSI specs. |
59 | */ | 59 | */ |
60 | static struct { | 60 | static const struct { |
61 | u_int period_factor; | 61 | u_int period_factor; |
62 | u_int period; /* in 100ths of ns */ | 62 | u_int period; /* in 100ths of ns */ |
63 | } scsi_syncrates[] = { | 63 | } scsi_syncrates[] = { |
diff --git a/drivers/scsi/aic7xxx/aic7xxx.h b/drivers/scsi/aic7xxx/aic7xxx.h index 862e0fbffa42..e4e651cca3e4 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.h +++ b/drivers/scsi/aic7xxx/aic7xxx.h | |||
@@ -1114,7 +1114,7 @@ typedef int (ahc_device_setup_t)(struct ahc_softc *); | |||
1114 | struct ahc_pci_identity { | 1114 | struct ahc_pci_identity { |
1115 | uint64_t full_id; | 1115 | uint64_t full_id; |
1116 | uint64_t id_mask; | 1116 | uint64_t id_mask; |
1117 | char *name; | 1117 | const char *name; |
1118 | ahc_device_setup_t *setup; | 1118 | ahc_device_setup_t *setup; |
1119 | }; | 1119 | }; |
1120 | 1120 | ||
@@ -1135,9 +1135,9 @@ extern const int ahc_num_aic7770_devs; | |||
1135 | /******************************************************************************/ | 1135 | /******************************************************************************/ |
1136 | 1136 | ||
1137 | /***************************** PCI Front End *********************************/ | 1137 | /***************************** PCI Front End *********************************/ |
1138 | struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); | 1138 | const struct ahc_pci_identity *ahc_find_pci_device(ahc_dev_softc_t); |
1139 | int ahc_pci_config(struct ahc_softc *, | 1139 | int ahc_pci_config(struct ahc_softc *, |
1140 | struct ahc_pci_identity *); | 1140 | const struct ahc_pci_identity *); |
1141 | int ahc_pci_test_register_access(struct ahc_softc *); | 1141 | int ahc_pci_test_register_access(struct ahc_softc *); |
1142 | #ifdef CONFIG_PM | 1142 | #ifdef CONFIG_PM |
1143 | void ahc_pci_resume(struct ahc_softc *ahc); | 1143 | void ahc_pci_resume(struct ahc_softc *ahc); |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_93cx6.c b/drivers/scsi/aic7xxx/aic7xxx_93cx6.c index 3cb07e114e89..dd11999b77b6 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_93cx6.c +++ b/drivers/scsi/aic7xxx/aic7xxx_93cx6.c | |||
@@ -84,16 +84,16 @@ struct seeprom_cmd { | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | /* Short opcodes for the c46 */ | 86 | /* Short opcodes for the c46 */ |
87 | static struct seeprom_cmd seeprom_ewen = {9, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; | 87 | static const struct seeprom_cmd seeprom_ewen = {9, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; |
88 | static struct seeprom_cmd seeprom_ewds = {9, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; | 88 | static const struct seeprom_cmd seeprom_ewds = {9, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; |
89 | 89 | ||
90 | /* Long opcodes for the C56/C66 */ | 90 | /* Long opcodes for the C56/C66 */ |
91 | static struct seeprom_cmd seeprom_long_ewen = {11, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; | 91 | static const struct seeprom_cmd seeprom_long_ewen = {11, {1, 0, 0, 1, 1, 0, 0, 0, 0}}; |
92 | static struct seeprom_cmd seeprom_long_ewds = {11, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; | 92 | static const struct seeprom_cmd seeprom_long_ewds = {11, {1, 0, 0, 0, 0, 0, 0, 0, 0}}; |
93 | 93 | ||
94 | /* Common opcodes */ | 94 | /* Common opcodes */ |
95 | static struct seeprom_cmd seeprom_write = {3, {1, 0, 1}}; | 95 | static const struct seeprom_cmd seeprom_write = {3, {1, 0, 1}}; |
96 | static struct seeprom_cmd seeprom_read = {3, {1, 1, 0}}; | 96 | static const struct seeprom_cmd seeprom_read = {3, {1, 1, 0}}; |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * Wait for the SEERDY to go high; about 800 ns. | 99 | * Wait for the SEERDY to go high; about 800 ns. |
@@ -108,7 +108,7 @@ static struct seeprom_cmd seeprom_read = {3, {1, 1, 0}}; | |||
108 | * Send a START condition and the given command | 108 | * Send a START condition and the given command |
109 | */ | 109 | */ |
110 | static void | 110 | static void |
111 | send_seeprom_cmd(struct seeprom_descriptor *sd, struct seeprom_cmd *cmd) | 111 | send_seeprom_cmd(struct seeprom_descriptor *sd, const struct seeprom_cmd *cmd) |
112 | { | 112 | { |
113 | uint8_t temp; | 113 | uint8_t temp; |
114 | int i = 0; | 114 | int i = 0; |
@@ -227,7 +227,7 @@ int | |||
227 | ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf, | 227 | ahc_write_seeprom(struct seeprom_descriptor *sd, uint16_t *buf, |
228 | u_int start_addr, u_int count) | 228 | u_int start_addr, u_int count) |
229 | { | 229 | { |
230 | struct seeprom_cmd *ewen, *ewds; | 230 | const struct seeprom_cmd *ewen, *ewds; |
231 | uint16_t v; | 231 | uint16_t v; |
232 | uint8_t temp; | 232 | uint8_t temp; |
233 | int i, k; | 233 | int i, k; |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index 62417ed17cf3..0ae2b4605d09 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c | |||
@@ -221,7 +221,7 @@ static void ahc_dumpseq(struct ahc_softc *ahc); | |||
221 | #endif | 221 | #endif |
222 | static int ahc_loadseq(struct ahc_softc *ahc); | 222 | static int ahc_loadseq(struct ahc_softc *ahc); |
223 | static int ahc_check_patch(struct ahc_softc *ahc, | 223 | static int ahc_check_patch(struct ahc_softc *ahc, |
224 | struct patch **start_patch, | 224 | const struct patch **start_patch, |
225 | u_int start_instr, u_int *skip_addr); | 225 | u_int start_instr, u_int *skip_addr); |
226 | static void ahc_download_instr(struct ahc_softc *ahc, | 226 | static void ahc_download_instr(struct ahc_softc *ahc, |
227 | u_int instrptr, uint8_t *dconsts); | 227 | u_int instrptr, uint8_t *dconsts); |
@@ -6851,7 +6851,7 @@ ahc_loadseq(struct ahc_softc *ahc) | |||
6851 | struct cs cs_table[num_critical_sections]; | 6851 | struct cs cs_table[num_critical_sections]; |
6852 | u_int begin_set[num_critical_sections]; | 6852 | u_int begin_set[num_critical_sections]; |
6853 | u_int end_set[num_critical_sections]; | 6853 | u_int end_set[num_critical_sections]; |
6854 | struct patch *cur_patch; | 6854 | const struct patch *cur_patch; |
6855 | u_int cs_count; | 6855 | u_int cs_count; |
6856 | u_int cur_cs; | 6856 | u_int cur_cs; |
6857 | u_int i; | 6857 | u_int i; |
@@ -6956,11 +6956,11 @@ ahc_loadseq(struct ahc_softc *ahc) | |||
6956 | } | 6956 | } |
6957 | 6957 | ||
6958 | static int | 6958 | static int |
6959 | ahc_check_patch(struct ahc_softc *ahc, struct patch **start_patch, | 6959 | ahc_check_patch(struct ahc_softc *ahc, const struct patch **start_patch, |
6960 | u_int start_instr, u_int *skip_addr) | 6960 | u_int start_instr, u_int *skip_addr) |
6961 | { | 6961 | { |
6962 | struct patch *cur_patch; | 6962 | const struct patch *cur_patch; |
6963 | struct patch *last_patch; | 6963 | const struct patch *last_patch; |
6964 | u_int num_patches; | 6964 | u_int num_patches; |
6965 | 6965 | ||
6966 | num_patches = ARRAY_SIZE(patches); | 6966 | num_patches = ARRAY_SIZE(patches); |
@@ -7019,7 +7019,7 @@ ahc_download_instr(struct ahc_softc *ahc, u_int instrptr, uint8_t *dconsts) | |||
7019 | case AIC_OP_JE: | 7019 | case AIC_OP_JE: |
7020 | case AIC_OP_JZ: | 7020 | case AIC_OP_JZ: |
7021 | { | 7021 | { |
7022 | struct patch *cur_patch; | 7022 | const struct patch *cur_patch; |
7023 | int address_offset; | 7023 | int address_offset; |
7024 | u_int address; | 7024 | u_int address; |
7025 | u_int skip_addr; | 7025 | u_int skip_addr; |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 01118c3f56b5..fd2b9785ff4f 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -511,13 +511,11 @@ ahc_linux_info(struct Scsi_Host *host) | |||
511 | bp = &buffer[0]; | 511 | bp = &buffer[0]; |
512 | ahc = *(struct ahc_softc **)host->hostdata; | 512 | ahc = *(struct ahc_softc **)host->hostdata; |
513 | memset(bp, 0, sizeof(buffer)); | 513 | memset(bp, 0, sizeof(buffer)); |
514 | strcpy(bp, "Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev "); | 514 | strcpy(bp, "Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev " AIC7XXX_DRIVER_VERSION "\n" |
515 | strcat(bp, AIC7XXX_DRIVER_VERSION); | 515 | " <"); |
516 | strcat(bp, "\n"); | ||
517 | strcat(bp, " <"); | ||
518 | strcat(bp, ahc->description); | 516 | strcat(bp, ahc->description); |
519 | strcat(bp, ">\n"); | 517 | strcat(bp, ">\n" |
520 | strcat(bp, " "); | 518 | " "); |
521 | ahc_controller_info(ahc, ahc_info); | 519 | ahc_controller_info(ahc, ahc_info); |
522 | strcat(bp, ahc_info); | 520 | strcat(bp, ahc_info); |
523 | strcat(bp, "\n"); | 521 | strcat(bp, "\n"); |
@@ -1033,7 +1031,7 @@ aic7xxx_setup(char *s) | |||
1033 | char *p; | 1031 | char *p; |
1034 | char *end; | 1032 | char *end; |
1035 | 1033 | ||
1036 | static struct { | 1034 | static const struct { |
1037 | const char *name; | 1035 | const char *name; |
1038 | uint32_t *flag; | 1036 | uint32_t *flag; |
1039 | } options[] = { | 1037 | } options[] = { |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c index 950a046788f0..0d7628f1f1ef 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c | |||
@@ -46,7 +46,7 @@ | |||
46 | */ | 46 | */ |
47 | #define ID(x) ID_C(x, PCI_CLASS_STORAGE_SCSI) | 47 | #define ID(x) ID_C(x, PCI_CLASS_STORAGE_SCSI) |
48 | 48 | ||
49 | static struct pci_device_id ahc_linux_pci_id_table[] = { | 49 | static const struct pci_device_id ahc_linux_pci_id_table[] = { |
50 | /* aic7850 based controllers */ | 50 | /* aic7850 based controllers */ |
51 | ID(ID_AHA_2902_04_10_15_20C_30C), | 51 | ID(ID_AHA_2902_04_10_15_20C_30C), |
52 | /* aic7860 based controllers */ | 52 | /* aic7860 based controllers */ |
@@ -206,7 +206,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
206 | const uint64_t mask_39bit = 0x7FFFFFFFFFULL; | 206 | const uint64_t mask_39bit = 0x7FFFFFFFFFULL; |
207 | struct ahc_softc *ahc; | 207 | struct ahc_softc *ahc; |
208 | ahc_dev_softc_t pci; | 208 | ahc_dev_softc_t pci; |
209 | struct ahc_pci_identity *entry; | 209 | const struct ahc_pci_identity *entry; |
210 | char *name; | 210 | char *name; |
211 | int error; | 211 | int error; |
212 | struct device *dev = &pdev->dev; | 212 | struct device *dev = &pdev->dev; |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_pci.c b/drivers/scsi/aic7xxx/aic7xxx_pci.c index 56848f41e4f9..c07cb6eebb02 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_pci.c +++ b/drivers/scsi/aic7xxx/aic7xxx_pci.c | |||
@@ -168,8 +168,7 @@ static ahc_device_setup_t ahc_aha394XX_setup; | |||
168 | static ahc_device_setup_t ahc_aha494XX_setup; | 168 | static ahc_device_setup_t ahc_aha494XX_setup; |
169 | static ahc_device_setup_t ahc_aha398XX_setup; | 169 | static ahc_device_setup_t ahc_aha398XX_setup; |
170 | 170 | ||
171 | static struct ahc_pci_identity ahc_pci_ident_table [] = | 171 | static const struct ahc_pci_identity ahc_pci_ident_table[] = { |
172 | { | ||
173 | /* aic7850 based controllers */ | 172 | /* aic7850 based controllers */ |
174 | { | 173 | { |
175 | ID_AHA_2902_04_10_15_20C_30C, | 174 | ID_AHA_2902_04_10_15_20C_30C, |
@@ -668,7 +667,7 @@ ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor, | |||
668 | return (result); | 667 | return (result); |
669 | } | 668 | } |
670 | 669 | ||
671 | struct ahc_pci_identity * | 670 | const struct ahc_pci_identity * |
672 | ahc_find_pci_device(ahc_dev_softc_t pci) | 671 | ahc_find_pci_device(ahc_dev_softc_t pci) |
673 | { | 672 | { |
674 | uint64_t full_id; | 673 | uint64_t full_id; |
@@ -676,7 +675,7 @@ ahc_find_pci_device(ahc_dev_softc_t pci) | |||
676 | uint16_t vendor; | 675 | uint16_t vendor; |
677 | uint16_t subdevice; | 676 | uint16_t subdevice; |
678 | uint16_t subvendor; | 677 | uint16_t subvendor; |
679 | struct ahc_pci_identity *entry; | 678 | const struct ahc_pci_identity *entry; |
680 | u_int i; | 679 | u_int i; |
681 | 680 | ||
682 | vendor = ahc_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); | 681 | vendor = ahc_pci_read_config(pci, PCIR_DEVVENDOR, /*bytes*/2); |
@@ -710,7 +709,7 @@ ahc_find_pci_device(ahc_dev_softc_t pci) | |||
710 | } | 709 | } |
711 | 710 | ||
712 | int | 711 | int |
713 | ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) | 712 | ahc_pci_config(struct ahc_softc *ahc, const struct ahc_pci_identity *entry) |
714 | { | 713 | { |
715 | u_int command; | 714 | u_int command; |
716 | u_int our_id; | 715 | u_int our_id; |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_proc.c b/drivers/scsi/aic7xxx/aic7xxx_proc.c index 3afa34c7c591..e92991a7c485 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_proc.c +++ b/drivers/scsi/aic7xxx/aic7xxx_proc.c | |||
@@ -58,7 +58,7 @@ static int ahc_proc_write_seeprom(struct ahc_softc *ahc, | |||
58 | * Table of syncrates that don't follow the "divisible by 4" | 58 | * Table of syncrates that don't follow the "divisible by 4" |
59 | * rule. This table will be expanded in future SCSI specs. | 59 | * rule. This table will be expanded in future SCSI specs. |
60 | */ | 60 | */ |
61 | static struct { | 61 | static const struct { |
62 | u_int period_factor; | 62 | u_int period_factor; |
63 | u_int period; /* in 100ths of ns */ | 63 | u_int period; /* in 100ths of ns */ |
64 | } scsi_syncrates[] = { | 64 | } scsi_syncrates[] = { |