diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 09:25:42 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-12 09:25:42 -0700 |
commit | 7e6973e9aca997d95995a7b17768f7b77b7c6c24 (patch) | |
tree | b4b7904773e8ff55b455599f5bf8674b132ba3d4 /include | |
parent | 000233e4d1321e54033d097e98f6868b11614217 (diff) | |
parent | b018fc09498f73da0014b44acbd59ea4a94300b4 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
[BLOCK] s390 xpram typo
[BLOCK] Only include the compat ioctl code if CONFIG_BLOCK is set
[BLOCK] Better fix for do_blk_trace_setup() for !CONFIG_BLOCK
[BLOCK] Move sector_div() from blkdev.h to kernel.h
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/blkdev.h | 14 | ||||
-rw-r--r-- | include/linux/blktrace_api.h | 7 | ||||
-rw-r--r-- | include/linux/kernel.h | 14 |
3 files changed, 15 insertions, 20 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 95be0ac57e7..5ed888b04b2 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -20,20 +20,6 @@ #include <asm/scatterlist.h> -#ifdef CONFIG_LBD -# include <asm/div64.h> -# define sector_div(a, b) do_div(a, b) -#else -# define sector_div(n, b)( \ -{ \ - int _res; \ - _res = (n) % (b); \ - (n) /= (b); \ - _res; \ -} \ -) -#endif - struct scsi_ioctl_command; struct request_queue; diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 2e105a12fe2..7e11d23ac36 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h @@ -290,12 +290,7 @@ static inline void blk_add_trace_remap(struct request_queue *q, struct bio *bio, #define blk_add_trace_generic(q, rq, rw, what) do { } while (0) #define blk_add_trace_pdu_int(q, what, bio, pdu) do { } while (0) #define blk_add_trace_remap(q, bio, dev, f, t) do {} while (0) -static inline int do_blk_trace_setup(struct request_queue *q, - struct block_device *bdev, - struct blk_user_trace_setup *buts) -{ - return 0; -} +#define do_blk_trace_setup(q, bdev, buts) (-ENOTTY) #endif /* CONFIG_BLK_DEV_IO_TRACE */ #endif /* __KERNEL__ */ #endif diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 47160fe378c..d9725a28a26 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -42,6 +42,20 @@ extern const char linux_proc_banner[]; #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#ifdef CONFIG_LBD +# include <asm/div64.h> +# define sector_div(a, b) do_div(a, b) +#else +# define sector_div(n, b)( \ +{ \ + int _res; \ + _res = (n) % (b); \ + (n) /= (b); \ + _res; \ +} \ +) +#endif + /** * upper_32_bits - return bits 32-63 of a number * @n: the number we're accessing |