pci_device_id definition cleanups

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Date: Friday, February 15, 2008 - 7:21 pm

I've done some work on cleaning up the definitions of pci_device_id to
make them "static const" (where possible) and to make sure they go into
__devinitconst.  There are about 350 changes of the type shown in the
diff at the end of this mail.

=EF=BB=BFAll these changes are in my public GIT tree at:

git://www.southpole.se/~jonas/git/linux.git

(Based on 2.6.25-rc2)

In addition to these pci_device_id changes, there are a few changesets
that move "const" data from __devinitdata to __devinitconst.

The tree above builds with both allmodconfig and allyesconfig.

=EF=BB=BF/Jonas

------

Representative example change:

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 4d59ae8..90c7820 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4967,7 +4967,7 @@ megaraid_shutdown(struct pci_dev *pdev)
 	__megaraid_shutdown(adapter);
 }
=20
-static struct pci_device_id megaraid_pci_tbl[] =3D {
+static const struct pci_device_id megaraid_pci_tbl[] __devinitconst =3D {
 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
 		PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
 	{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
pci_device_id definition cleanups, Jonas Bonn, (Fri Feb 15, 7:21 pm)
Re: pci_device_id definition cleanups, Sam Ravnborg, (Fri Feb 15, 10:23 pm)
Re: pci_device_id definition cleanups, Olof Johansson, (Sat Feb 16, 1:27 am)
Re: pci_device_id definition cleanups, Sam Ravnborg, (Sat Feb 16, 8:24 am)
Re: pci_device_id definition cleanups, Greg KH, (Fri Feb 15, 8:05 pm)
Re: pci_device_id definition cleanups, Jeff Garzik, (Fri Feb 15, 8:55 pm)
Re: pci_device_id definition cleanups, Greg KH, (Fri Feb 15, 8:57 pm)