Commit 7f23e146 authored by James Bottomley's avatar James Bottomley

[SCSI] correct some dropped const compiler warnings

Make the vendor, model and rev fields in scsi_device pointers to const
and update a few prototypes of functions using them.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 8a47cd34
...@@ -354,8 +354,9 @@ static int scsi_dev_info_list_add_str(char *dev_list) ...@@ -354,8 +354,9 @@ static int scsi_dev_info_list_add_str(char *dev_list)
* @model, if found, return the matching flags value, else return * @model, if found, return the matching flags value, else return
* the host or global default settings. * the host or global default settings.
**/ **/
int scsi_get_device_flags(struct scsi_device *sdev, unsigned char *vendor, int scsi_get_device_flags(struct scsi_device *sdev,
unsigned char *model) const unsigned char *vendor,
const unsigned char *model)
{ {
struct scsi_dev_info_list *devinfo; struct scsi_dev_info_list *devinfo;
unsigned int bflags; unsigned int bflags;
......
...@@ -57,7 +57,8 @@ static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition) ...@@ -57,7 +57,8 @@ static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
/* scsi_devinfo.c */ /* scsi_devinfo.c */
extern int scsi_get_device_flags(struct scsi_device *sdev, extern int scsi_get_device_flags(struct scsi_device *sdev,
unsigned char *vendor, unsigned char *model); const unsigned char *vendor,
const unsigned char *model);
extern int __init scsi_init_devinfo(void); extern int __init scsi_init_devinfo(void);
extern void scsi_exit_devinfo(void); extern void scsi_exit_devinfo(void);
......
...@@ -79,9 +79,9 @@ struct scsi_device { ...@@ -79,9 +79,9 @@ struct scsi_device {
char inq_periph_qual; /* PQ from INQUIRY data */ char inq_periph_qual; /* PQ from INQUIRY data */
unsigned char inquiry_len; /* valid bytes in 'inquiry' */ unsigned char inquiry_len; /* valid bytes in 'inquiry' */
unsigned char * inquiry; /* INQUIRY response data */ unsigned char * inquiry; /* INQUIRY response data */
char * vendor; /* [back_compat] point into 'inquiry' ... */ const char * vendor; /* [back_compat] point into 'inquiry' ... */
char * model; /* ... after scan; point to static string */ const char * model; /* ... after scan; point to static string */
char * rev; /* ... "nullnullnullnull" before scan */ const char * rev; /* ... "nullnullnullnull" before scan */
unsigned char current_tag; /* current tag */ unsigned char current_tag; /* current tag */
struct scsi_target *sdev_target; /* used only for single_lun */ struct scsi_target *sdev_target; /* used only for single_lun */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment