• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef BSG_H
2 #define BSG_H
3 
4 #include <uapi/linux/bsg.h>
5 
6 
7 #if defined(CONFIG_BLK_DEV_BSG)
8 struct bsg_class_device {
9 	struct device *class_dev;
10 	struct device *parent;
11 	int minor;
12 	struct request_queue *queue;
13 	struct kref ref;
14 	void (*release)(struct device *);
15 };
16 
17 extern int bsg_register_queue(struct request_queue *q,
18 			      struct device *parent, const char *name,
19 			      void (*release)(struct device *));
20 extern void bsg_unregister_queue(struct request_queue *);
21 #else
bsg_register_queue(struct request_queue * q,struct device * parent,const char * name,void (* release)(struct device *))22 static inline int bsg_register_queue(struct request_queue *q,
23 				     struct device *parent, const char *name,
24 				     void (*release)(struct device *))
25 {
26 	return 0;
27 }
bsg_unregister_queue(struct request_queue * q)28 static inline void bsg_unregister_queue(struct request_queue *q)
29 {
30 }
31 #endif
32 
33 #endif
34