Commit 5bb7472f authored by Marc Zyngier's avatar Marc Zyngier Committed by Linus Torvalds

[PATCH] EISA bus update

- Don't leave resource name uninitialized if CONFIG_EISA_NAME is not set.
- Print root device bus_id (so we know which bridge is probed).
- From Zwane Mwaikambo : Add a release method to virtual root, so it
  stays quiet if probing fails (because some pci-eisa bridge have been
  found before).
parent e8f3645c
......@@ -172,6 +172,7 @@ static int __init eisa_init_device (struct eisa_root_device *root,
{
char *sig;
unsigned long sig_addr;
int i;
sig_addr = SLOT_ADDRESS (root, slot) + EISA_VENDOR_ID_OFFSET;
......@@ -189,13 +190,13 @@ static int __init eisa_init_device (struct eisa_root_device *root,
edev->dev.dma_mask = &edev->dma_mask;
sprintf (edev->dev.bus_id, "%02X:%02X", root->bus_nr, slot);
for (i = 0; i < EISA_MAX_RESOURCES; i++) {
#ifdef CONFIG_EISA_NAMES
{
int i;
for (i = 0; i < EISA_MAX_RESOURCES; i++)
edev->res[i].name = edev->pretty_name;
}
#else
edev->res[i].name = edev->id.sig;
#endif
}
if (is_forced_dev (enable_dev, root, edev))
edev->state = EISA_CONFIG_ENABLED | EISA_CONFIG_FORCED;
......@@ -274,7 +275,8 @@ static int __init eisa_probe (struct eisa_root_device *root)
int i, c;
struct eisa_device *edev;
printk (KERN_INFO "EISA: Probing bus %d\n", root->bus_nr);
printk (KERN_INFO "EISA: Probing bus %d at %s\n",
root->bus_nr, root->dev->bus_id);
/* First try to get hold of slot 0. If there is no device
* here, simply fail, unless root->force_probe is set. */
......
......@@ -22,6 +22,7 @@
#endif
static int force_probe = EISA_FORCE_PROBE_DEFAULT;
static void virtual_eisa_release (struct device *);
/* The default EISA device parent (virtual root device).
* Now use a platform device, since that's the obvious choice. */
......@@ -29,6 +30,9 @@ static int force_probe = EISA_FORCE_PROBE_DEFAULT;
static struct platform_device eisa_root_dev = {
.name = "eisa",
.id = 0,
.dev = {
.release = virtual_eisa_release,
},
};
static struct eisa_root_device eisa_bus_root = {
......@@ -39,6 +43,11 @@ static struct eisa_root_device eisa_bus_root = {
.dma_mask = 0xffffffff,
};
static void virtual_eisa_release (struct device *dev)
{
/* nothing really to do here */
}
static int virtual_eisa_root_init (void)
{
int r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment