[PATCH 2.6.9-rc2-mm1] floppy ACPI enumeration update

From: Bjorn Helgaas
Date: Tue Sep 21 2004 - 15:58:29 EST


This adds ACPI device name ("Floppy Controller") and takes
advantage of acpi_device_bid() rather than the open-coded
equivalent.

Please include in the next -mm patchset.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

diff -u -ur 2.6.9-rc2-mm1/drivers/block/floppy.c floppy1/drivers/block/floppy.c
--- 2.6.9-rc2-mm1/drivers/block/floppy.c 2004-09-21 12:51:48.000000000 -0600
+++ floppy1/drivers/block/floppy.c 2004-09-21 14:41:11.000000000 -0600
@@ -4301,7 +4301,9 @@
if (ACPI_FAILURE(status))
return -ENODEV;

- printk("%s: ACPI %s [%s] at I/O 0x%x-0x%x", DEVICE_NAME,
+ strncpy(acpi_device_name(device), "Floppy Controller",
+ sizeof(acpi_device_name(device)));
+ printk("ACPI: %s [%s] at I/O 0x%x-0x%x",
acpi_device_name(device), acpi_device_bid(device),
fd.io_region[0].base,
fd.io_region[0].base + fd.io_region[0].size - 1);
@@ -4335,8 +4337,8 @@
(port) < (region).base + (region).size)

if (!(contains(fd.io_region[0], dcr) || contains(fd.io_region[1], dcr))) {
- printk(KERN_WARNING "%s: %s _CRS doesn't include FD_DCR; also claiming 0x%x\n",
- DEVICE_NAME, device->pnp.bus_id, dcr);
+ printk(KERN_WARNING "ACPI: [%s] doesn't declare FD_DCR; also claiming 0x%x\n",
+ acpi_device_bid(device), dcr);
}

#undef contains
@@ -4348,11 +4350,11 @@
} else if (acpi_floppies == 1) {
FDC2 = base;
if (fd.irq != FLOPPY_IRQ || fd.dma_channel != FLOPPY_DMA)
- printk(KERN_WARNING "%s: different IRQ/DMA info for %s; may not work\n",
- DEVICE_NAME, device->pnp.bus_id);
+ printk(KERN_WARNING "%s: different IRQ/DMA info for [%s]; may not work\n",
+ DEVICE_NAME, acpi_device_bid(device));
} else {
- printk(KERN_ERR "%s: only 2 controllers supported; %s ignored\n",
- DEVICE_NAME, device->pnp.bus_id);
+ printk(KERN_ERR "%s: only 2 controllers supported; [%s] ignored\n",
+ DEVICE_NAME, acpi_device_bid(device));
return -ENODEV;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/