[PATCH] Update serial PnP driver - 2.5.46 (6/6)

Adam Belay (ambx1@neo.rr.com)
Wed, 6 Nov 2002 21:13:14 +0000


This patch updates the serial PnP driver to the changes.

Thanks,
Adam

--- a/drivers/serial/8250_pnp.c Thu Oct 31 00:41:37 2002
+++ b/drivers/serial/8250_pnp.c Sun Nov 3 15:44:43 2002
@@ -316,6 +316,8 @@
{ "", 0 }
};

+MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
+
static void inline avoid_irq_share(struct pnp_dev *dev)
{
unsigned int map = 0x1FF8;
@@ -393,10 +395,10 @@
if (flags & SPCI_FL_NO_SHIRQ)
avoid_irq_share(dev);
memset(&serial_req, 0, sizeof(serial_req));
- serial_req.irq = dev->irq_resource[0].start;
- serial_req.port = pci_resource_start(dev, 0);
+ serial_req.irq = pnp_irq(dev,0);
+ serial_req.port = pnp_port_start(dev, 0);
if (HIGH_BITS_OFFSET)
- serial_req.port = dev->resource[0].start >> HIGH_BITS_OFFSET;
+ serial_req.port = pnp_port_start(dev, 0) >> HIGH_BITS_OFFSET;
#ifdef SERIAL_DEBUG_PNP
printk("Setup PNP port: port %x, irq %d, type %d\n",
serial_req.port, serial_req.irq, serial_req.io_type);
@@ -407,7 +409,7 @@
line = register_serial(&serial_req);

if (line >= 0)
- dev->driver_data = (void *)(line + 1);
+ pnp_set_drvdata(dev, (void *)(line + 1));
return line >= 0 ? 0 : -ENODEV;

}
@@ -442,5 +444,3 @@

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Generic 8250/16x50 PnP serial driver");
-/* FIXME */
-/*MODULE_DEVICE_TABLE(pnpbios, pnp_dev_table);*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/