Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cef09b80 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'eisa' into next

* eisa:
  Revert "EISA: Initialize device before its resources"
  Revert "EISA: Log device resources in dmesg"
parents 6e2d98dc 765ee51f
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -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,19 +329,20 @@ static int __init eisa_probe(struct eisa_root_device *root)
		return -ENOMEM;
	}
		
	if (eisa_init_device(root, edev, 0)) {
	if (eisa_request_resources(root, edev, 0)) {
		dev_warn(root->dev,
		         "EISA: Cannot allocate resource for mainboard\n");
		kfree(edev);
		if (!root->force_probe)
			return -ENODEV;
			return -EBUSY;
		goto force_probe;
	}

	if (eisa_request_resources(root, edev, 0)) {
		dev_warn(root->dev,
		         "EISA: Cannot allocate resource for mainboard\n");
	if (eisa_init_device(root, edev, 0)) {
		eisa_release_resources(edev);
		kfree(edev);
		if (!root->force_probe)
			return -EBUSY;
			return -ENODEV;
		goto force_probe;
	}

@@ -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)