mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge branch 'eisa' into next
* eisa: Revert "EISA: Initialize device before its resources" Revert "EISA: Log device resources in dmesg"
This commit is contained in:
commit
cef09b808e
@ -277,18 +277,19 @@ static int __init eisa_request_resources(struct eisa_root_device *root,
|
||||
}
|
||||
|
||||
if (slot) {
|
||||
edev->res[i].name = NULL;
|
||||
edev->res[i].start = SLOT_ADDRESS(root, slot)
|
||||
+ (i * 0x400);
|
||||
edev->res[i].end = edev->res[i].start + 0xff;
|
||||
edev->res[i].flags = IORESOURCE_IO;
|
||||
} else {
|
||||
edev->res[i].name = NULL;
|
||||
edev->res[i].start = SLOT_ADDRESS(root, slot)
|
||||
+ EISA_VENDOR_ID_OFFSET;
|
||||
edev->res[i].end = edev->res[i].start + 3;
|
||||
edev->res[i].flags = IORESOURCE_IO | IORESOURCE_BUSY;
|
||||
}
|
||||
|
||||
dev_printk(KERN_DEBUG, &edev->dev, "%pR\n", &edev->res[i]);
|
||||
if (request_resource(root->res, &edev->res[i]))
|
||||
goto failed;
|
||||
}
|
||||
@ -328,13 +329,6 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (eisa_init_device(root, edev, 0)) {
|
||||
kfree(edev);
|
||||
if (!root->force_probe)
|
||||
return -ENODEV;
|
||||
goto force_probe;
|
||||
}
|
||||
|
||||
if (eisa_request_resources(root, edev, 0)) {
|
||||
dev_warn(root->dev,
|
||||
"EISA: Cannot allocate resource for mainboard\n");
|
||||
@ -344,6 +338,14 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
||||
goto force_probe;
|
||||
}
|
||||
|
||||
if (eisa_init_device(root, edev, 0)) {
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
if (!root->force_probe)
|
||||
return -ENODEV;
|
||||
goto force_probe;
|
||||
}
|
||||
|
||||
dev_info(&edev->dev, "EISA: Mainboard %s detected\n", edev->id.sig);
|
||||
|
||||
if (eisa_register_device(edev)) {
|
||||
@ -363,11 +365,6 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (eisa_init_device(root, edev, i)) {
|
||||
kfree(edev);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (eisa_request_resources(root, edev, i)) {
|
||||
dev_warn(root->dev,
|
||||
"Cannot allocate resource for EISA slot %d\n",
|
||||
@ -376,6 +373,12 @@ static int __init eisa_probe(struct eisa_root_device *root)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (eisa_init_device(root, edev, i)) {
|
||||
eisa_release_resources(edev);
|
||||
kfree(edev);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (edev->state == (EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED))
|
||||
enabled_str = " (forced enabled)";
|
||||
else if (edev->state == EISA_CONFIG_FORCED)
|
||||
|
Loading…
x
Reference in New Issue
Block a user