[SCSI] correct some dropped const compiler warnings
authorJames Bottomley <jejb@titanic.(none)>
Thu, 1 Dec 2005 18:50:13 +0000 (12:50 -0600)
committerJames Bottomley <jejb@titanic.(none)>
Wed, 14 Dec 2005 01:12:05 +0000 (18:12 -0700)
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: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_priv.h
include/scsi/scsi_device.h

index e69477d1889bd8e6ab67f862f99d9c3ccc8de7af..f01ec0a7c506f2a68ec8fc993ec643a58d47f1fa 100644 (file)
@@ -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
  *     the host or global default settings.
  **/
-int scsi_get_device_flags(struct scsi_device *sdev, unsigned char *vendor,
-                         unsigned char *model)
+int scsi_get_device_flags(struct scsi_device *sdev,
+                         const unsigned char *vendor,
+                         const unsigned char *model)
 {
        struct scsi_dev_info_list *devinfo;
        unsigned int bflags;
index d632d9e1493cb1fe83b9e1171fd9e9a1fba875d3..a8d121c8fbcda618b7a81a2438cf8a120c4cb456 100644 (file)
@@ -57,7 +57,8 @@ static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
 
 /* scsi_devinfo.c */
 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 void scsi_exit_devinfo(void);
 
index 85cfd88461c8d79337400f5a28ecd0aec63014da..063e32fe036c4e11d6e8e6a66384f1bc5a6e98fd 100644 (file)
@@ -79,9 +79,9 @@ struct scsi_device {
        char inq_periph_qual;   /* PQ from INQUIRY data */      
        unsigned char inquiry_len;      /* valid bytes in 'inquiry' */
        unsigned char * inquiry;        /* INQUIRY response data */
-       char * vendor;          /* [back_compat] point into 'inquiry' ... */
-       char * model;           /* ... after scan; point to static string */
-       char * rev;             /* ... "nullnullnullnull" before scan */
+       const char * vendor;            /* [back_compat] point into 'inquiry' ... */
+       const char * model;             /* ... after scan; point to static string */
+       const char * rev;               /* ... "nullnullnullnull" before scan */
        unsigned char current_tag;      /* current tag */
        struct scsi_target      *sdev_target;   /* used only for single_lun */