diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2014-01-28 11:52:01 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2014-01-28 11:52:01 -0500 |
commit | 381d3ee33b9ccbe93404dbeae5be435922254f71 (patch) | |
tree | 48a27ac46a0b8875da605879a2f4f8ceceb0c20a /block/blk-mq-cpu.c | |
parent | 0d0b7d427987f6e98b6f32e84ee071f36f85c3d4 (diff) |
block/blk-mq-cpu.c: use hotcpu_notifier()
Cleaner, reduces text size when cpu hotplug is disabled.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-cpu.c')
-rw-r--r-- | block/blk-mq-cpu.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/block/blk-mq-cpu.c b/block/blk-mq-cpu.c index 20576e3476e9..3146befb56aa 100644 --- a/block/blk-mq-cpu.c +++ b/block/blk-mq-cpu.c | |||
@@ -28,10 +28,6 @@ static int blk_mq_main_cpu_notify(struct notifier_block *self, | |||
28 | return NOTIFY_OK; | 28 | return NOTIFY_OK; |
29 | } | 29 | } |
30 | 30 | ||
31 | static struct notifier_block __cpuinitdata blk_mq_main_cpu_notifier = { | ||
32 | .notifier_call = blk_mq_main_cpu_notify, | ||
33 | }; | ||
34 | |||
35 | void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier) | 31 | void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier) |
36 | { | 32 | { |
37 | BUG_ON(!notifier->notify); | 33 | BUG_ON(!notifier->notify); |
@@ -58,5 +54,5 @@ void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, | |||
58 | 54 | ||
59 | void __init blk_mq_cpu_init(void) | 55 | void __init blk_mq_cpu_init(void) |
60 | { | 56 | { |
61 | register_hotcpu_notifier(&blk_mq_main_cpu_notifier); | 57 | hotcpu_notifier(blk_mq_main_cpu_notify, 0); |
62 | } | 58 | } |