mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
ide: small ide_register_port() cleanup
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
b1d249e845
commit
96d4094123
@ -641,14 +641,9 @@ static int ide_register_port(ide_hwif_t *hwif)
|
|||||||
/* register with global device tree */
|
/* register with global device tree */
|
||||||
dev_set_name(&hwif->gendev, hwif->name);
|
dev_set_name(&hwif->gendev, hwif->name);
|
||||||
hwif->gendev.driver_data = hwif;
|
hwif->gendev.driver_data = hwif;
|
||||||
if (hwif->gendev.parent == NULL) {
|
hwif->gendev.parent = hwif->dev;
|
||||||
if (hwif->dev)
|
|
||||||
hwif->gendev.parent = hwif->dev;
|
|
||||||
else
|
|
||||||
/* Would like to do = &device_legacy */
|
|
||||||
hwif->gendev.parent = NULL;
|
|
||||||
}
|
|
||||||
hwif->gendev.release = hwif_release_dev;
|
hwif->gendev.release = hwif_release_dev;
|
||||||
|
|
||||||
ret = device_register(&hwif->gendev);
|
ret = device_register(&hwif->gendev);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printk(KERN_WARNING "IDE: %s: device_register error: %d\n",
|
printk(KERN_WARNING "IDE: %s: device_register error: %d\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user