block: Move power management code into a new source file
Move the code for runtime power management from blk-core.c into the new source file blk-pm.c. Move the corresponding declarations from <linux/blkdev.h> into <linux/blk-pm.h>. For CONFIG_PM=n, leave out the declarations of the functions that are not used in that mode. This patch not only reduces the number of #ifdefs in the block layer core code but also reduces the size of header file <linux/blkdev.h> and hence should help to reduce the build time of the Linux kernel if CONFIG_PM is not defined. Signed-off-by:Bart Van Assche <bvanassche@acm.org> Reviewed-by:
Ming Lei <ming.lei@redhat.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Cc: Jianchao Wang <jianchao.w.wang@oracle.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Showing
- block/Kconfig 3 additions, 0 deletionsblock/Kconfig
- block/Makefile 1 addition, 0 deletionsblock/Makefile
- block/blk-core.c 1 addition, 195 deletionsblock/blk-core.c
- block/blk-pm.c 188 additions, 0 deletionsblock/blk-pm.c
- block/blk-pm.h 43 additions, 0 deletionsblock/blk-pm.h
- block/elevator.c 1 addition, 21 deletionsblock/elevator.c
- drivers/scsi/scsi_pm.c 1 addition, 0 deletionsdrivers/scsi/scsi_pm.c
- drivers/scsi/sd.c 1 addition, 0 deletionsdrivers/scsi/sd.c
- drivers/scsi/sr.c 1 addition, 0 deletionsdrivers/scsi/sr.c
- include/linux/blk-pm.h 24 additions, 0 deletionsinclude/linux/blk-pm.h
- include/linux/blkdev.h 0 additions, 23 deletionsinclude/linux/blkdev.h
Loading
Please register or sign in to comment