- card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
- if (card == NULL)
- return -ENOMEM;
- strcpy(card->driver, "MPU-401 UART");
- strcpy(card->shortname, card->driver);
- sprintf(card->longname, "%s at 0x%lx, ", card->shortname, port[dev]);
- if (irq[dev] >= 0) {
- sprintf(card->longname + strlen(card->longname), "IRQ %d", irq[dev]);
- } else {
- strcat(card->longname, "polled");
- }
-#ifdef USE_ACPI_PNP
- if (device) {
- strcat(card->longname, ", bus id ");
- strlcat(card->longname, acpi_device_bid(device), sizeof(card->longname));
+#define IO_EXTENT 2
+
+static struct pnp_device_id snd_mpu401_pnpids[] = {
+ { .id = "PNPb006" },
+ { .id = "" }
+};
+
+MODULE_DEVICE_TABLE(pnp, snd_mpu401_pnpids);
+
+static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device,
+ const struct pnp_device_id *id)
+{
+ if (!pnp_port_valid(device, 0) ||
+ pnp_port_flags(device, 0) & IORESOURCE_DISABLED) {
+ snd_printk(KERN_ERR "no PnP port\n");
+ return -ENODEV;