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