diff options
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 994e41099b42..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) |
@@ -1492,7 +1492,7 @@ static struct device_attribute *ide_port_attrs[] = { | |||
1492 | 1492 | ||
1493 | static int ide_sysfs_register_port(ide_hwif_t *hwif) | 1493 | static int ide_sysfs_register_port(ide_hwif_t *hwif) |
1494 | { | 1494 | { |
1495 | int i, rc; | 1495 | int i, uninitialized_var(rc); |
1496 | 1496 | ||
1497 | for (i = 0; ide_port_attrs[i]; i++) { | 1497 | for (i = 0; ide_port_attrs[i]; i++) { |
1498 | rc = device_create_file(hwif->portdev, ide_port_attrs[i]); | 1498 | rc = device_create_file(hwif->portdev, ide_port_attrs[i]); |