From: Andrey Panin <pazke@orbita1.ru>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] MODULE_DEVICE_TABLE for Multi-Tech serial card driver
Date: Fri, 19 Oct 2001 16:21:02 +0400 [thread overview]
Message-ID: <20011019162102.B3170@orbita1.ru> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 269 bytes --]
Ugh .. yet another MODULE_DEVICE_TABLE, looks like many drivers lack it.
Also some static zero initializers removed.
--
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
[-- Attachment #1.2: patch-isicom --]
[-- Type: text/plain, Size: 2457 bytes --]
diff -u -X dontdiff linux.old/drivers/char/isicom.c linux/drivers/char/isicom.c
--- linux.old/drivers/char/isicom.c Mon Oct 15 15:34:17 2001
+++ linux/drivers/char/isicom.c Fri Oct 19 16:19:06 2001
@@ -60,24 +60,27 @@
#include <linux/isicom.h>
-static int device_id[] = { 0x2028,
- 0x2051,
- 0x2052,
- 0x2053,
- 0x2054,
- 0x2055,
- 0x2056,
- 0x2057,
- 0x2058
- };
+static struct pci_device_id isicom_pci_tbl[] = {
+ { VENDOR_ID, 0x2028, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2051, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2052, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2054, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2055, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2056, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2057, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { VENDOR_ID, 0x2058, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { 0 }
+};
+MODULE_DEVICE_TABLE(pci, isicom_pci_tbl);
-static int isicom_refcount = 0;
+static int isicom_refcount;
static int prev_card = 3; /* start servicing isi_card[0] */
-static struct isi_board * irq_to_board[16] = { NULL, };
+static struct isi_board * irq_to_board[16];
static struct tty_driver isicom_normal, isicom_callout;
-static struct tty_struct * isicom_table[PORT_COUNT] = { NULL, };
-static struct termios * isicom_termios[PORT_COUNT] = { NULL, };
-static struct termios * isicom_termios_locked[PORT_COUNT] = { NULL, };
+static struct tty_struct * isicom_table[PORT_COUNT];
+static struct termios * isicom_termios[PORT_COUNT];
+static struct termios * isicom_termios_locked[PORT_COUNT];
static struct isi_board isi_card[BOARD_COUNT];
static struct isi_port isi_ports[PORT_COUNT];
@@ -1974,7 +1977,7 @@
for (idx=0; idx < DEVID_COUNT; idx++) {
dev = NULL;
for (;;){
- if (!(dev = pci_find_device(VENDOR_ID, device_id[idx], dev)))
+ if (!(dev = pci_find_device(VENDOR_ID, isicom_pci_tbl[idx].device, dev)))
break;
if (card >= BOARD_COUNT)
break;
@@ -1988,7 +1991,7 @@
* space.
*/
pciirq = dev->irq;
- printk(KERN_INFO "ISI PCI Card(Device ID 0x%x)\n", device_id[idx]);
+ printk(KERN_INFO "ISI PCI Card(Device ID 0x%x)\n", isicom_pci_tbl[idx].device);
/*
* allot the first empty slot in the array
*/
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
reply other threads:[~2001-10-19 12:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011019162102.B3170@orbita1.ru \
--to=pazke@orbita1.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.