diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:05 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:07 -0400 |
commit | ed9e1982347b36573cd622ee5f4e2a7ccd79b3fd (patch) | |
tree | 79d834094d655ec97cfc0a382a9207ebc8e711a5 /drivers/ide | |
parent | 870d6656126add8e383645732b03df2b7ccd4f94 (diff) |
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 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index a51a30e9eab3..70aa86c8807e 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1188,7 +1188,7 @@ static struct kobject *exact_match(dev_t dev, int *part, void *data) | |||
1188 | { | 1188 | { |
1189 | struct gendisk *p = data; | 1189 | struct gendisk *p = data; |
1190 | *part &= (1 << PARTN_BITS) - 1; | 1190 | *part &= (1 << PARTN_BITS) - 1; |
1191 | return &p->dev.kobj; | 1191 | return &disk_to_dev(p)->kobj; |
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | static int exact_lock(dev_t dev, void *data) | 1194 | static int exact_lock(dev_t dev, void *data) |