aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Yuan2011-04-13 15:14:54 -0500
committerJens Axboe2011-04-13 15:14:54 -0500
commit80656b67b3988f83edd86a280d9937124fe62050 (patch)
tree58d23b396fa17262b697134cf2a58651f26d3460 /block/blk-sysfs.c
parentf4af3c3d077a004762aaad052049c809fd8c6f0c (diff)
downloadkernel-common-80656b67b3988f83edd86a280d9937124fe62050.tar.gz
kernel-common-80656b67b3988f83edd86a280d9937124fe62050.tar.xz
kernel-common-80656b67b3988f83edd86a280d9937124fe62050.zip
block, blk-sysfs: Use the variable directly instead of a function call
In the function blk_register_queue(), var _dev_ is already assigned by disk_to_dev().So use it directly instead of calling disk_to_dev() again. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Modified by me to delete an empty line in the same function while in there anyway. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 261c75c665a..6d735122bc5 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -498,7 +498,6 @@ int blk_register_queue(struct gendisk *disk)
498{ 498{
499 int ret; 499 int ret;
500 struct device *dev = disk_to_dev(disk); 500 struct device *dev = disk_to_dev(disk);
501
502 struct request_queue *q = disk->queue; 501 struct request_queue *q = disk->queue;
503 502
504 if (WARN_ON(!q)) 503 if (WARN_ON(!q))
@@ -521,7 +520,7 @@ int blk_register_queue(struct gendisk *disk)
521 if (ret) { 520 if (ret) {
522 kobject_uevent(&q->kobj, KOBJ_REMOVE); 521 kobject_uevent(&q->kobj, KOBJ_REMOVE);
523 kobject_del(&q->kobj); 522 kobject_del(&q->kobj);
524 blk_trace_remove_sysfs(disk_to_dev(disk)); 523 blk_trace_remove_sysfs(dev);
525 kobject_put(&dev->kobj); 524 kobject_put(&dev->kobj);
526 return ret; 525 return ret;
527 } 526 }