Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=893de2dffb0923d9bdba4abd66afcec3cf9103ba
Commit:     893de2dffb0923d9bdba4abd66afcec3cf9103ba
Parent:     29d73aab3368ff18006c3591bc6d2f54c06c9bcb
Author:     Jiri Slaby <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 12 00:51:49 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Feb 12 09:48:28 2007 -0800

    [PATCH] Char: cyclades, use pci_device_id
    
    Use pci_device_id struct instead of ushort array. Add MODULE_DEVICE_TABLE.
    
    Signed-off-by: Jiri Slaby <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/cyclades.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 363beb1..54df355 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -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 *);
@@ -4758,7 +4759,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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to