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