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