Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[sfrench/cifs-2.6.git] / drivers / char / cyclades.c
index 3ffa0807754c34313f9288299552f97df2c8468f..16dc5d1d3cb4f2715be9889d3e2a8bf822dfefec 100644 (file)
@@ -829,17 +829,18 @@ static unsigned short cy_pci_nboard;
 static unsigned short cy_isa_nboard;
 static unsigned short cy_nboard;
 #ifdef CONFIG_PCI
-static unsigned short cy_pci_dev_id[] = {
-       PCI_DEVICE_ID_CYCLOM_Y_Lo,      /* PCI < 1Mb */
-       PCI_DEVICE_ID_CYCLOM_Y_Hi,      /* PCI > 1Mb */
-       PCI_DEVICE_ID_CYCLOM_4Y_Lo,     /* 4Y PCI < 1Mb */
-       PCI_DEVICE_ID_CYCLOM_4Y_Hi,     /* 4Y PCI > 1Mb */
-       PCI_DEVICE_ID_CYCLOM_8Y_Lo,     /* 8Y PCI < 1Mb */
-       PCI_DEVICE_ID_CYCLOM_8Y_Hi,     /* 8Y PCI > 1Mb */
-       PCI_DEVICE_ID_CYCLOM_Z_Lo,      /* Z PCI < 1Mb */
-       PCI_DEVICE_ID_CYCLOM_Z_Hi,      /* Z PCI > 1Mb */
-       0                       /* end of table */
+static struct pci_device_id cy_pci_dev_id[] __devinitdata = {
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Lo) },      /* PCI < 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Hi) },      /* PCI > 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_4Y_Lo) },     /* 4Y PCI < 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_4Y_Hi) },     /* 4Y PCI > 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_8Y_Lo) },     /* 8Y PCI < 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_8Y_Hi) },     /* 8Y PCI > 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Z_Lo) },      /* Z PCI < 1Mb */
+       { PCI_DEVICE(PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Z_Hi) },      /* Z PCI > 1Mb */
+       { }                     /* end of table */
 };
+MODULE_DEVICE_TABLE(pci, cy_pci_dev_id);
 #endif
 
 static void cy_start(struct tty_struct *);
@@ -3500,6 +3501,7 @@ get_serial_info(struct cyclades_port *info,
        tmp.irq = cinfo->irq;
        tmp.flags = info->flags;
        tmp.close_delay = info->close_delay;
+       tmp.closing_wait = info->closing_wait;
        tmp.baud_base = info->baud;
        tmp.custom_divisor = info->custom_divisor;
        tmp.hub6 = 0;           /*!!! */
@@ -4488,7 +4490,6 @@ static void cy_flush_buffer(struct tty_struct *tty)
                CY_UNLOCK(info, flags);
        }
        tty_wakeup(tty);
-       wake_up_interruptible(&tty->write_wait);
 }                              /* cy_flush_buffer */
 
 /*
@@ -4759,7 +4760,7 @@ static int __init cy_detect_pci(void)
 
        for (i = 0; i < NR_CARDS; i++) {
                /* look for a Cyclades card by vendor and device id */
-               while ((device_id = cy_pci_dev_id[dev_index]) != 0) {
+               while ((device_id = cy_pci_dev_id[dev_index].device) != 0) {
                        if ((pdev = pci_get_device(PCI_VENDOR_ID_CYCLADES,
                                                   device_id, pdev)) == NULL) {
                                dev_index++;    /* try next device id */