]> git.baikalelectronics.ru Git - kernel.git/commit
block: use class_dev_iterator instead of class_for_each_device()
authorTejun Heo <tj@kernel.org>
Wed, 3 Sep 2008 06:57:12 +0000 (08:57 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 9 Oct 2008 06:56:04 +0000 (08:56 +0200)
commitb7716ac77a4648e1d3cd0b131c41abb9bce798db
tree51535a76dee0b21857d2c64da22a0406c0dc7357
parent26c2271bb4a751b42d95d8eec5d18082ee3dc3c7
block: use class_dev_iterator instead of class_for_each_device()

Recent block_class iteration updates 1b567c19..afac334 converted all
class device iteration to class_for_each_device() and
class_find_device(), which are correct but pain in the ass to use.
This pach converts them to newly introduced class_dev_iterator so that
they can use more natural control structures instead of separate
callbacks and struct to pass parameters to them.

This results in smaller and easier code.

This patch also restores the original behavior of not printing header
in /proc/partitions if there's no partition to print.  This is trivial
but still user-visible behavior.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/genhd.c