summaryrefslogtreecommitdiff
path: root/include/linux/blk_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/blk_types.h')
-rw-r--r--include/linux/blk_types.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index ebfb4e7c1fd1..9698f459cc65 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -49,6 +49,9 @@ struct block_device {
struct super_block *bd_fsfreeze_sb;
} __randomize_layout;
+#define bdev_kobj(_bdev) \
+ (&part_to_dev((_bdev)->bd_part)->kobj)
+
/*
* Block error status values. See block/blk-core:blk_errors for the details.
* Alpha cannot write a byte atomically, so we need to use 32-bit value.