Skip to content

Commit

Permalink
block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
Browse files Browse the repository at this point in the history
After commit b2b49cc (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM in the block device core.

Reviewed-by: Aaron Lu <[email protected]>
Acked-by: Jens Axboe <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
rafaeljw committed Dec 4, 2014
1 parent ceb6c9c commit 47fafbc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ void part_round_stats(int cpu, struct hd_struct *part)
}
EXPORT_SYMBOL_GPL(part_round_stats);

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static void blk_pm_put_request(struct request *rq)
{
if (rq->q->dev && !(rq->cmd_flags & REQ_PM) && !--rq->q->nr_pending)
Expand Down Expand Up @@ -2134,7 +2134,7 @@ void blk_account_io_done(struct request *req)
}
}

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
/*
* Don't process normal requests when queue is suspended
* or in the process of suspending/resuming
Expand Down Expand Up @@ -3159,7 +3159,7 @@ void blk_finish_plug(struct blk_plug *plug)
}
EXPORT_SYMBOL(blk_finish_plug);

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
/**
* blk_pm_runtime_init - Block layer runtime PM initialization routine
* @q: the queue of the device
Expand Down
2 changes: 1 addition & 1 deletion block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ void elv_bio_merged(struct request_queue *q, struct request *rq,
e->type->ops.elevator_bio_merged_fn(q, rq, bio);
}

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
static void blk_pm_requeue_request(struct request *rq)
{
if (rq->q->dev && !(rq->cmd_flags & REQ_PM))
Expand Down
4 changes: 2 additions & 2 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ struct request_queue {
*/
struct kobject mq_kobj;

#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
struct device *dev;
int rpm_status;
unsigned int nr_pending;
Expand Down Expand Up @@ -1057,7 +1057,7 @@ extern void blk_put_queue(struct request_queue *);
/*
* block layer runtime pm functions
*/
#ifdef CONFIG_PM_RUNTIME
#ifdef CONFIG_PM
extern void blk_pm_runtime_init(struct request_queue *q, struct device *dev);
extern int blk_pre_runtime_suspend(struct request_queue *q);
extern void blk_post_runtime_suspend(struct request_queue *q, int err);
Expand Down

0 comments on commit 47fafbc

Please sign in to comment.