From: James Bottomley Date: Mon, 23 Jul 2007 14:53:51 +0000 (-0500) Subject: [SCSI] bsg: fix unused variable warnings for BLK_DEV_BSG=n X-Git-Tag: v2.6.23-rc2~164^2~21 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a4ee0df8b3d007f0d685d38a56dc0b91e01aaaf7;p=linux-2.6-omap-h63xx.git [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 --- diff --git a/include/linux/bsg.h b/include/linux/bsg.h index 241eed03e42..102dc096e1c 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h @@ -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__ */