2007-07-09 18:38:05 +08:00
|
|
|
#ifndef BSG_H
|
|
|
|
#define BSG_H
|
|
|
|
|
2012-10-13 17:46:48 +08:00
|
|
|
#include <uapi/linux/bsg.h>
|
2009-03-09 22:51:38 +08:00
|
|
|
|
2006-12-20 18:19:32 +08:00
|
|
|
|
2007-07-09 18:38:05 +08:00
|
|
|
#if defined(CONFIG_BLK_DEV_BSG)
|
|
|
|
struct bsg_class_device {
|
2008-02-22 07:13:36 +08:00
|
|
|
struct device *class_dev;
|
2008-04-18 23:43:14 +08:00
|
|
|
struct device *parent;
|
2007-07-09 18:38:05 +08:00
|
|
|
int minor;
|
2007-07-09 18:40:35 +08:00
|
|
|
struct request_queue *queue;
|
2008-04-18 23:43:14 +08:00
|
|
|
struct kref ref;
|
|
|
|
void (*release)(struct device *);
|
2007-07-09 18:38:05 +08:00
|
|
|
};
|
|
|
|
|
2008-04-18 23:43:14 +08:00
|
|
|
extern int bsg_register_queue(struct request_queue *q,
|
|
|
|
struct device *parent, const char *name,
|
|
|
|
void (*release)(struct device *));
|
2007-07-09 18:40:35 +08:00
|
|
|
extern void bsg_unregister_queue(struct request_queue *);
|
2007-07-09 18:38:05 +08:00
|
|
|
#else
|
2008-04-18 23:43:14 +08:00
|
|
|
static inline int bsg_register_queue(struct request_queue *q,
|
|
|
|
struct device *parent, const char *name,
|
|
|
|
void (*release)(struct device *))
|
2007-07-23 22:53:51 +08:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2008-04-18 23:43:14 +08:00
|
|
|
static inline void bsg_unregister_queue(struct request_queue *q)
|
2007-07-23 22:53:51 +08:00
|
|
|
{
|
|
|
|
}
|
2007-07-09 18:38:05 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|