提交 a4ee0df8 编写于 作者: J James Bottomley 提交者: James Bottomley

[SCSI] bsg: fix unused variable warnings for BLK_DEV_BSG=n

Just using #defines for the
bsg_register_queue()/bsg_unregister_queue() can cause undefined
variables when they're defined to nothing.  Use dummy inline functions
instead.
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 2cd614c8
......@@ -59,8 +59,13 @@ struct bsg_class_device {
extern int bsg_register_queue(struct request_queue *, struct device *, const char *);
extern void bsg_unregister_queue(struct request_queue *);
#else
#define bsg_register_queue(disk, dev, name) (0)
#define bsg_unregister_queue(disk) do { } while (0)
static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name)
{
return 0;
}
static inline void bsg_unregister_queue(struct request_queue *rq)
{
}
#endif
#endif /* __KERNEL__ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册