From: "Son P. Nguyen" <fastmutex@gmail.com>
To: gregkh@linuxfoundation.org
Cc: driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
"Son P. Nguyen" <fastmutex@gmail.com>
Subject: [PATCH 1/2] Staging: dgnc: dgnc_driver: fixed coding style of dgnc_pci_tbl
Date: Sat, 19 Apr 2014 22:48:10 +0000 [thread overview]
Message-ID: <1397947691-19232-1-git-send-email-fastmutex@gmail.com> (raw)
From: "Son P. Nguyen" <fastmutex@gmail.com>
Fixed coding style of dgnc_pci_tbl definition (longer than 80 chars)
Signed-off-by: Son P. Nguyen <fastmutex@gmail.com>
---
drivers/staging/dgnc/dgnc_driver.c | 36 +++++++++++++++++++-----------------
1 file changed, 19 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index b1a39b2..e91d3a7 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -124,25 +124,27 @@ static ulong dgnc_poll_time; /* Time of next poll */
static uint dgnc_poll_stop; /* Used to tell poller to stop */
static struct timer_list dgnc_poll_timer;
+#define DIGIVID_PCI_DEVICE_ID(subdevice, driver_data) \
+ { DIGI_VID, PCI_DEVICE_##subdevice, PCI_ANY_ID, 0, 0, driver_data }
static struct pci_device_id dgnc_pci_tbl[] = {
- { DIGI_VID, PCI_DEVICE_CLASSIC_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
- { DIGI_VID, PCI_DEVICE_CLASSIC_4_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 },
- { DIGI_VID, PCI_DEVICE_CLASSIC_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 },
- { DIGI_VID, PCI_DEVICE_CLASSIC_8_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 },
- { DIGI_VID, PCI_DEVICE_NEO_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 },
- { DIGI_VID, PCI_DEVICE_NEO_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 },
- { DIGI_VID, PCI_DEVICE_NEO_2DB9_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 },
- { DIGI_VID, PCI_DEVICE_NEO_2DB9PRI_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 },
- { DIGI_VID, PCI_DEVICE_NEO_2RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
- { DIGI_VID, PCI_DEVICE_NEO_2RJ45PRI_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 },
- { DIGI_VID, PCI_DEVICE_NEO_1_422_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 },
- { DIGI_VID, PCI_DEVICE_NEO_1_422_485_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 },
- { DIGI_VID, PCI_DEVICE_NEO_2_422_485_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 },
- { DIGI_VID, PCI_DEVICE_NEO_EXPRESS_8_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 },
- { DIGI_VID, PCI_DEVICE_NEO_EXPRESS_4_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },
- { DIGI_VID, PCI_DEVICE_NEO_EXPRESS_4RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 },
- { DIGI_VID, PCI_DEVICE_NEO_EXPRESS_8RJ45_DID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },
+ { DIGIVID_PCI_DEVICE_ID(CLASSIC_4_DID, 0 },
+ { DIGIVID_PCI_DEVICE_ID(CLASSIC_4_422_DID, 1 },
+ { DIGIVID_PCI_DEVICE_ID(CLASSIC_8_DID, 2 },
+ { DIGIVID_PCI_DEVICE_ID(CLASSIC_8_422_DID, 3 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_4_DID, 4 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_8_DID, 5 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_2DB9_DID, 6 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_2DB9PRI_DID, 7 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_2RJ45_DID, 8 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_2RJ45PRI_DID, 9 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_1_422_DID, 10 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_1_422_485_DID, 11 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_2_422_485_DID, 12 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_EXPRESS_8_DID, 13 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_EXPRESS_4_DID, 14 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_EXPRESS_4RJ45_DID, 15 },
+ { DIGIVID_PCI_DEVICE_ID(NEO_EXPRESS_8RJ45_DID, 16 },
{0,} /* 0 terminated list. */
};
MODULE_DEVICE_TABLE(pci, dgnc_pci_tbl);
--
1.8.1.2
next reply other threads:[~2014-04-20 2:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-19 22:48 Son P. Nguyen [this message]
2014-04-19 22:48 ` [PATCH 2/2] Staging: dgnc: dgnc_driver: fixed coding style braces Son P. Nguyen
2014-04-20 18:05 ` [PATCH v2 1/2] Staging: dgnc: dgnc_driver: fixed dgnc_pci_tbl definition Son P. Nguyen
2014-04-20 18:05 ` [PATCH v2 2/2] Staging: dgnc: dgnc_driver: fixed incorrect braces Son P. Nguyen
2014-04-22 9:27 ` [PATCH v2 1/2] Staging: dgnc: dgnc_driver: fixed dgnc_pci_tbl definition Dan Carpenter
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=1397947691-19232-1-git-send-email-fastmutex@gmail.com \
--to=fastmutex@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox