LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: greg@kroah.com, Jonas Bonn <jonas@southpole.se>
Subject: [PATCH] Add PCI_DEVICE_TABLE macro
Date: Wed, 20 Feb 2008 13:53:37 +0100	[thread overview]
Message-ID: <1203512031-14318-2-git-send-email-jonas@southpole.se> (raw)
In-Reply-To: <1203512031-14318-1-git-send-email-jonas@southpole.se>

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

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

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 87195b6..c7a91b1 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -389,6 +389,15 @@ 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
+ * @_table: device table name
+ *
+ * This macro is used to create a struct pci_device_id array (a device table) 
+ * in a generic manner.
+ */
+#define PCI_DEVICE_TABLE(_table) 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-20 12:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 12:53 pci_device_id cleanups Jonas Bonn
2008-02-20 12:53 ` Jonas Bonn [this message]
2008-02-20 12:53   ` [PATCH] [net] use PCI_DEVICE_TABLE: makes struct pci_device_id array const and adds section attribute __devinitconst Jonas Bonn
2008-02-20 12:53     ` Jonas Bonn
2008-02-20 12:53       ` Jonas Bonn
2008-02-20 12:53         ` Jonas Bonn
2008-02-20 12:53           ` Jonas Bonn
2008-02-20 12:53             ` Jonas Bonn
2008-02-20 12:53               ` Jonas Bonn
2008-02-20 12:53                 ` Jonas Bonn
2008-02-20 12:53                   ` Jonas Bonn
2008-02-20 12:53                     ` Jonas Bonn
2008-02-20 12:53                       ` Jonas Bonn
2008-02-20 12:53                         ` Jonas Bonn
2008-02-20 12:53                           ` Jonas Bonn
2008-02-20 12:53                             ` Jonas Bonn
2008-02-20 13:17 ` pci_device_id cleanups Sam Ravnborg
2008-02-20 13:27   ` Jonas Bonn
2008-02-20 13:55     ` PowerPC toolchain for x86 [Was: pci_device_id cleanups] Sam Ravnborg
2008-02-20 14:03       ` Jonas Bonn
  -- strict thread matches above, loose matches on Subject: below --
2008-02-18  8:03 [PATCH] Add PCI_DEVICE_TABLE macro Jonas Bonn
2008-02-17 12:10 Jonas Bonn
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-17 18:14 ` Randy Dunlap

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=1203512031-14318-2-git-send-email-jonas@southpole.se \
    --to=jonas@southpole.se \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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).