diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2007-07-23 10:53:51 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-07-24 14:24:05 -0400 |
commit | a4ee0df8b3d007f0d685d38a56dc0b91e01aaaf7 (patch) | |
tree | 3b805b164df128ebb15e71dd915c9a14e2da31cd /include/linux/bsg.h | |
parent | 2cd614c8732172524c36cd5245620338928062b6 (diff) |
[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: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/linux/bsg.h')
-rw-r--r-- | include/linux/bsg.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/bsg.h b/include/linux/bsg.h index 241eed03e42c..102dc096e1cb 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h | |||
@@ -59,8 +59,13 @@ struct bsg_class_device { | |||
59 | extern int bsg_register_queue(struct request_queue *, struct device *, const char *); | 59 | extern int bsg_register_queue(struct request_queue *, struct device *, const char *); |
60 | extern void bsg_unregister_queue(struct request_queue *); | 60 | extern void bsg_unregister_queue(struct request_queue *); |
61 | #else | 61 | #else |
62 | #define bsg_register_queue(disk, dev, name) (0) | 62 | static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name) |
63 | #define bsg_unregister_queue(disk) do { } while (0) | 63 | { |
64 | return 0; | ||
65 | } | ||
66 | static inline void bsg_unregister_queue(struct request_queue *rq) | ||
67 | { | ||
68 | } | ||
64 | #endif | 69 | #endif |
65 | 70 | ||
66 | #endif /* __KERNEL__ */ | 71 | #endif /* __KERNEL__ */ |