summaryrefslogtreecommitdiff
path: root/include/linux/bsg.h
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-08-05 17:04:01 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-08-05 17:04:01 -0300
commit57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch)
tree5e910f0e82173f4ef4f51111366a3f1299037a7b /include/linux/bsg.h
Initial import
Diffstat (limited to 'include/linux/bsg.h')
-rw-r--r--include/linux/bsg.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/bsg.h b/include/linux/bsg.h
new file mode 100644
index 000000000..7173f6e9d
--- /dev/null
+++ b/include/linux/bsg.h
@@ -0,0 +1,33 @@
+#ifndef BSG_H
+#define BSG_H
+
+#include <uapi/linux/bsg.h>
+
+
+#if defined(CONFIG_BLK_DEV_BSG)
+struct bsg_class_device {
+ struct device *class_dev;
+ struct device *parent;
+ int minor;
+ struct request_queue *queue;
+ struct kref ref;
+ void (*release)(struct device *);
+};
+
+extern int bsg_register_queue(struct request_queue *q,
+ struct device *parent, const char *name,
+ void (*release)(struct device *));
+extern void bsg_unregister_queue(struct request_queue *);
+#else
+static inline int bsg_register_queue(struct request_queue *q,
+ struct device *parent, const char *name,
+ void (*release)(struct device *))
+{
+ return 0;
+}
+static inline void bsg_unregister_queue(struct request_queue *q)
+{
+}
+#endif
+
+#endif