summaryrefslogtreecommitdiffstats
path: root/block/blk-integrity.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 12:56:05 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:07 +0200
commited9e1982347b36573cd622ee5f4e2a7ccd79b3fd (patch)
tree79d834094d655ec97cfc0a382a9207ebc8e711a5 /block/blk-integrity.c
parentblock: implement CONFIG_DEBUG_BLOCK_EXT_DEVT (diff)
downloadlinux-ed9e1982347b36573cd622ee5f4e2a7ccd79b3fd.tar.xz
linux-ed9e1982347b36573cd622ee5f4e2a7ccd79b3fd.zip
block: implement and use {disk|part}_to_dev()
Implement {disk|part}_to_dev() and use them to access generic device instead of directly dereferencing {disk|part}->dev. To make sure no user is left behind, rename generic devices fields to __dev. This is in preparation of unifying partition 0 handling with other partitions. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-integrity.c')
-rw-r--r--block/blk-integrity.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-integrity.c b/block/blk-integrity.c
index d87606eaca1d..69023da63151 100644
--- a/block/blk-integrity.c
+++ b/block/blk-integrity.c
@@ -331,7 +331,8 @@ int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template)
return -1;
if (kobject_init_and_add(&bi->kobj, &integrity_ktype,
- &disk->dev.kobj, "%s", "integrity")) {
+ &disk_to_dev(disk)->kobj,
+ "%s", "integrity")) {
kmem_cache_free(integrity_cachep, bi);
return -1;
}
@@ -375,7 +376,7 @@ void blk_integrity_unregister(struct gendisk *disk)
kobject_uevent(&bi->kobj, KOBJ_REMOVE);
kobject_del(&bi->kobj);
- kobject_put(&disk->dev.kobj);
+ kobject_put(&disk_to_dev(disk)->kobj);
kmem_cache_free(integrity_cachep, bi);
}
EXPORT_SYMBOL(blk_integrity_unregister);