LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: linux-kernel@vger.kernel.org, greg@kroah.com
Cc: olof@lixom.net, sam@ravnborg.com, Jonas Bonn <jonas@southpole.se>
Subject: [PATCH] Add PCI_DEVICE_TABLE macro
Date: Sun, 17 Feb 2008 13:10:05 +0100	[thread overview]
Message-ID: <1203250205-5103-1-git-send-email-jonas@southpole.se> (raw)

The definitions of struct pci_device_id arrays should generally follow
the same pattern across the entire kernel.  This macro defines this
array as static const and puts it into the __devinitconst section.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
---
 include/linux/pci.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 87195b6..487d31c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -389,6 +389,14 @@ struct pci_driver {
 #define	to_pci_driver(drv) container_of(drv, struct pci_driver, driver)
 
 /**
+ * PCI_DEVICE_TABLE - macro used to describe a pci device table
+ * 
+ * This macro is used to create a struct pci_device_id array in a generic
+ * manner.
+ */
+#define PCI_DEVICE_TABLE(_table) static const struct pci_device_id _table[] __devinitconst
+
+/**
  * PCI_DEVICE - macro used to describe a specific pci device
  * @vend: the 16 bit PCI Vendor ID
  * @dev: the 16 bit PCI Device ID
-- 
1.5.3.8



             reply	other threads:[~2008-02-17 12:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-17 12:10 Jonas Bonn [this message]
2008-02-17 12:13 ` Jonas Bonn
2008-02-18  4:48   ` Greg KH
2008-02-18  7:34     ` Jonas Bonn
2008-02-20 16:11       ` Greg KH
2008-02-20 17:05         ` Jeff Garzik
2008-02-22 10:02           ` [PATCH] Add DECLARE_PCI_DEVICE_TABLE macro Jonas Bonn
2008-02-17 18:14 ` [PATCH] Add PCI_DEVICE_TABLE macro Randy Dunlap
2008-02-18  8:03 Jonas Bonn
2008-02-20 12:53 pci_device_id cleanups Jonas Bonn
2008-02-20 12:53 ` [PATCH] Add PCI_DEVICE_TABLE macro Jonas Bonn

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=1203250205-5103-1-git-send-email-jonas@southpole.se \
    --to=jonas@southpole.se \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sam@ravnborg.com \
    --subject='Re: [PATCH] Add PCI_DEVICE_TABLE macro' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).