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