bsg.h 734 Bytes
Newer Older
1 2 3
#ifndef BSG_H
#define BSG_H

4
#include <uapi/linux/bsg.h>
5

6

7 8
#if defined(CONFIG_BLK_DEV_BSG)
struct bsg_class_device {
9
	struct device *class_dev;
10
	struct device *parent;
11
	int minor;
12
	struct request_queue *queue;
13 14
	struct kref ref;
	void (*release)(struct device *);
15 16
};

17 18 19
extern int bsg_register_queue(struct request_queue *q,
			      struct device *parent, const char *name,
			      void (*release)(struct device *));
20
extern void bsg_unregister_queue(struct request_queue *);
21
#else
22 23 24
static inline int bsg_register_queue(struct request_queue *q,
				     struct device *parent, const char *name,
				     void (*release)(struct device *))
25 26 27
{
	return 0;
}
28
static inline void bsg_unregister_queue(struct request_queue *q)
29 30
{
}
31 32 33
#endif

#endif