Skip to content

Commit

Permalink
[SCSI] bsg: fix unused variable warnings for BLK_DEV_BSG=n
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Bottomley authored and James Bottomley committed Jul 24, 2007
1 parent 2cd614c commit a4ee0df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions include/linux/bsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
Expand Down

0 comments on commit a4ee0df

Please sign in to comment.