Skip to content
Snippets Groups Projects
Commit 381d3ee3 authored by Andrew Morton's avatar Andrew Morton Committed by Jens Axboe
Browse files

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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 0d0b7d42
No related branches found
No related tags found
No related merge requests found
...@@ -28,10 +28,6 @@ static int blk_mq_main_cpu_notify(struct notifier_block *self, ...@@ -28,10 +28,6 @@ static int blk_mq_main_cpu_notify(struct notifier_block *self,
return NOTIFY_OK; return NOTIFY_OK;
} }
static struct notifier_block __cpuinitdata blk_mq_main_cpu_notifier = {
.notifier_call = blk_mq_main_cpu_notify,
};
void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier) void blk_mq_register_cpu_notifier(struct blk_mq_cpu_notifier *notifier)
{ {
BUG_ON(!notifier->notify); BUG_ON(!notifier->notify);
...@@ -58,5 +54,5 @@ void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, ...@@ -58,5 +54,5 @@ void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier,
void __init blk_mq_cpu_init(void) void __init blk_mq_cpu_init(void)
{ {
register_hotcpu_notifier(&blk_mq_main_cpu_notifier); hotcpu_notifier(blk_mq_main_cpu_notify, 0);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment