@@ -546,27 +546,6 @@ static int scsi_dev_info_list_add_str(char *dev_list)
}
/**
- * get_device_flags - get device specific flags from the dynamic device list.
- * @sdev: &scsi_device to get flags for
- * @vendor: vendor name
- * @model: model name
- *
- * Description:
- * Search the global scsi_dev_info_list (specified by list zero)
- * for an entry matching @vendor and @model, if found, return the
- * matching flags value, else return the host or global default
- * settings. Called during scan time.
- **/
-int scsi_get_device_flags(struct scsi_device *sdev,
- const unsigned char *vendor,
- const unsigned char *model)
-{
- return scsi_get_device_flags_keyed(sdev, vendor, model,
- SCSI_DEVINFO_GLOBAL);
-}
-
-
-/**
* scsi_get_device_flags_keyed - get device specific flags from the dynamic device list
* @sdev: &scsi_device to get flags for
* @vendor: vendor name
@@ -43,18 +43,6 @@ static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
/* scsi_devinfo.c */
-/* list of keys for the lists */
-enum {
- SCSI_DEVINFO_GLOBAL = 0,
- SCSI_DEVINFO_SPI,
-};
-
-extern int scsi_get_device_flags(struct scsi_device *sdev,
- const unsigned char *vendor,
- const unsigned char *model);
-extern int scsi_get_device_flags_keyed(struct scsi_device *sdev,
- const unsigned char *vendor,
- const unsigned char *model, int key);
extern int scsi_dev_info_list_add_keyed(int compatible, char *vendor,
char *model, char *strflags,
int flags, int key);
@@ -35,6 +35,7 @@
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_spi.h>
+#include <scsi/scsi_devinfo.h>
#define SPI_NUM_ATTRS 14 /* increase this if you add attributes */
#define SPI_OTHER_ATTRS 1 /* Increase this if you add "always
@@ -38,4 +38,36 @@
#define BLIST_NO_RSOC 0x20000000 /* don't try to issue RSOC */
#define BLIST_MAX_1024 0x40000000 /* maximum 1024 sector cdb length */
+/* list of keys for the lists */
+enum {
+ SCSI_DEVINFO_GLOBAL = 0,
+ SCSI_DEVINFO_SPI,
+};
+
+extern int scsi_get_device_flags_keyed(struct scsi_device *sdev,
+ const unsigned char *vendor,
+ const unsigned char *model, int key);
+
+/**
+ * scsi_get_device_flags - get device specific flags from the dynamic
+ * device list.
+ * @sdev: &scsi_device to get flags for
+ * @vendor: vendor name
+ * @model: model name
+ *
+ * Description:
+ * Search the global scsi_dev_info_list (specified by list zero)
+ * for an entry matching @vendor and @model, if found, return the
+ * matching flags value, else return the host or global default
+ * settings. Called during scan time.
+ **/
+static inline int scsi_get_device_flags(struct scsi_device *sdev,
+ const unsigned char *vendor,
+ const unsigned char *model)
+{
+ return scsi_get_device_flags_keyed(sdev, vendor, model,
+ SCSI_DEVINFO_GLOBAL);
+}
+
+
#endif
scsi_get_device_flags is just a wrapper for scsi_get_device_flags_keyed. The latter is exported, the former isn't. And both functions _and_ the 'key' values are only defined in the (internal) scsi_priv.h header file. This patch moves these definitions into scsi_devinfo.h to make them available for other modules. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/scsi/scsi_devinfo.c | 21 --------------------- drivers/scsi/scsi_priv.h | 12 ------------ drivers/scsi/scsi_transport_spi.c | 1 + include/scsi/scsi_devinfo.h | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 33 deletions(-)