Skip to contentSkip to conversation

add scsi_driver.h

PATCH In review Christoph Hellwig 2 participants 3 messages Jun 24, 2003 – Jun 26, 2003

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add scsi_driver.h

include/scsi/scsi_driver.h contains �verything related to upper level drivers. Unlike the other header moves there's no compatiblity this time as it's easy to fix up the few users.

drivers/scsi/hosts.h +0 -20
diff -Nru a/drivers/scsi/hosts.h b/drivers/scsi/hosts.h
@@ -26,28 +26,8 @@
 
 #include <linux/config.h>
 #include <linux/proc_fs.h>
-#include <linux/types.h>
 
 #include <scsi/scsi_host.h>
-
-struct scsi_driver {
-	struct module		*owner;
-	struct device_driver	gendrv;
-
-	int (*init_command)(struct scsi_cmnd *);
-	void (*rescan)(struct device *);
-};
-#define to_scsi_driver(drv) \
-	container_of((drv), struct scsi_driver, gendrv)
-
-extern int scsi_register_driver(struct device_driver *);
-#define scsi_unregister_driver(drv) \
-	driver_unregister(drv);
-
-extern int scsi_register_interface(struct class_interface *);
-#define scsi_unregister_interface(intf) \
-	class_interface_unregister(intf)
-
 
 /**
  * scsi_find_device - find a device given the host
drivers/scsi/osst.c +1 -0
diff -Nru a/drivers/scsi/osst.c b/drivers/scsi/osst.c
@@ -63,6 +63,7 @@
 
 #include "scsi.h"
 #include "hosts.h"
+#include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 
 #define ST_KILOBYTE 1024
drivers/scsi/scsi_lib.c +1 -0
diff -Nru a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
@@ -18,6 +18,7 @@
 
 #include "scsi.h"
 #include "hosts.h"
+#include <scsi/scsi_driver.h>
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
drivers/scsi/scsi_scan.c +1 -0
diff -Nru a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
@@ -33,6 +33,7 @@
 
 #include "scsi.h"
 #include "hosts.h"
+#include <scsi/scsi_driver.h>
 
 #include "scsi_priv.h"
 #include "scsi_logging.h"
drivers/scsi/scsi_syms.c +1 -0
diff -Nru a/drivers/scsi/scsi_syms.c b/drivers/scsi/scsi_syms.c
@@ -19,6 +19,7 @@
 #include <asm/dma.h>
 
 #include "scsi.h"
+#include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 #include "hosts.h"
 #include "scsi_logging.h"
drivers/scsi/sd.c +2 -0
diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c
@@ -49,6 +49,8 @@
 
 #include "scsi.h"
 #include "hosts.h"
+
+#include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/scsicam.h>
 
drivers/scsi/sg.c +1 -0
diff -Nru a/drivers/scsi/sg.c b/drivers/scsi/sg.c
@@ -64,6 +64,7 @@
 #include <linux/blk.h>
 #include "scsi.h"
 #include "hosts.h"
+#include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/sg.h>
 
drivers/scsi/sr.c +2 -0
diff -Nru a/drivers/scsi/sr.c b/drivers/scsi/sr.c
@@ -48,6 +48,8 @@
 
 #include "scsi.h"
 #include "hosts.h"
+
+#include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>	/* For the door lock/unlock commands */
 
 #include "scsi_logging.h"
drivers/scsi/st.c +2 -0
diff -Nru a/drivers/scsi/st.c b/drivers/scsi/st.c
@@ -59,6 +59,8 @@
 
 #include "scsi.h"
 #include "hosts.h"
+
+#include <scsi/scsi_driver.h>
 #include <scsi/scsi_ioctl.h>
 
 #define ST_KILOBYTE 1024

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#1 lore raw
Quoted 3 lines · Christoph Hellwig

include/scsi/scsi_driver.h contains æverything related to upper level drivers. Unlike the other header moves there's no compatiblity this time as it's easy to fix up the few users.

This patch actually doesn't seem to contain scsi/scsi_driver.h

James

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 6 lines · James Bottomley
Quoted 3 lines · Christoph Hellwig

include/scsi/scsi_driver.h contains ?verything related to upper level drivers. Unlike the other header moves there's no compatiblity this time as it's easy to fix up the few users.

This patch actually doesn't seem to contain scsi/scsi_driver.h

Looks like I forgot to check it in. Here it is:

#ifndef _SCSI_SCSI_DRIVER_H
#define _SCSI_SCSI_DRIVER_H

#include <linux/device.h>

struct module;

struct scsi_driver {
	struct module		*owner;
	struct device_driver	gendrv;

	int (*init_command)(struct scsi_cmnd *);
	void (*rescan)(struct device *);
};

#define to_scsi_driver(drv) \
container_of((drv), struct scsi_driver, gendrv)

extern int scsi_register_driver(struct device_driver *);

#define scsi_unregister_driver(drv) \
	driver_unregister(drv);

extern int scsi_register_interface(struct class_interface *); #define scsi_unregister_interface(intf) \
class_interface_unregister(intf)

#endif /* _SCSI_SCSI_DRIVER_H */