lkml.org 
[lkml]   [2001]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] const initdata.

As defined in in Rusty's kernel-hacking doc, __initdata must not be
marked as const. Patch below does this for the PCI subsystem.

*nb*, This kind of patch needs to be done in quite a few other
places too.

regards,

Dave.

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs .

diff -urN --exclude-from=/home/davej/.exclude linux-ac/drivers/pci/names.c linux-dj/drivers/pci/names.c
--- linux-ac/drivers/pci/names.c Mon Oct 2 20:00:16 2000
+++ linux-dj/drivers/pci/names.c Fri Aug 24 00:48:59 2001
@@ -32,9 +32,9 @@
* real memory.. Parse the same file multiple times
* to get all the info.
*/
-#define VENDOR( vendor, name ) static const char __vendorstr_##vendor[] __initdata = name;
+#define VENDOR( vendor, name ) static char __vendorstr_##vendor[] __initdata = name;
#define ENDVENDOR()
-#define DEVICE( vendor, device, name ) static const char __devicestr_##vendor##device[] __initdata = name;
+#define DEVICE( vendor, device, name ) static char __devicestr_##vendor##device[] __initdata = name;
#include "devlist.h"


@@ -43,7 +43,7 @@
#define DEVICE( vendor, device, name ) { 0x##device, 0, __devicestr_##vendor##device },
#include "devlist.h"

-static const struct pci_vendor_info __initdata pci_vendor_list[] = {
+static struct pci_vendor_info __initdata pci_vendor_list[] = {
#define VENDOR( vendor, name ) { 0x##vendor, sizeof(__devices_##vendor) / sizeof(struct pci_device_info), __vendorstr_##vendor, __devices_##vendor },
#define ENDVENDOR()
#define DEVICE( vendor, device, name )

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:58    [W:0.038 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site