Skip to content

Commit

Permalink
block/blk-mq-cpu.c: use hotcpu_notifier()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
akpm00 authored and axboe committed Jan 28, 2014
1 parent 0d0b7d4 commit 381d3ee
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions block/blk-mq-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ static int blk_mq_main_cpu_notify(struct notifier_block *self,
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)
{
BUG_ON(!notifier->notify);
Expand All @@ -58,5 +54,5 @@ void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier,

void __init blk_mq_cpu_init(void)
{
register_hotcpu_notifier(&blk_mq_main_cpu_notifier);
hotcpu_notifier(blk_mq_main_cpu_notify, 0);
}

0 comments on commit 381d3ee

Please sign in to comment.