]> git.proxmox.com Git - mirror_ubuntu-artful-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)
commitdef4e38ddda9bef20b69bfa939195c2f79da7979
tree51535a76dee0b21857d2c64da22a0406c0dc7357
parent2ac3cee5298a247b2774f3319b28a05f588c3f0e
block: use class_dev_iterator instead of class_for_each_device()

Recent block_class iteration updates 5c6f35c5..27f3025 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