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