Commit 9c07b6c6 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Nathan Scott

[PATCH] fix OOPS for multiple IDE PCI modules and CONFIG_PROC_FS=y

The problem is that when loading next IDE PCI module memory used by
previously registered ide_pci_host_proc_list entry is already unmapped
(because of __{dev}initdata).  This doesn't happen in built-in case
because this memory is freed after all drivers are initialized.
Fix it by removing __{dev}initdata from all ide_pci_host_proc_t.

Thanks to Andre Tomt <andre@tomt.net> for help in debugging this.
parent 07aecea7
......@@ -78,7 +78,7 @@ static u8 aec62xx_proc;
static int aec62xx_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t aec62xx_procs[] __initdata = {
static ide_pci_host_proc_t aec62xx_procs[] = {
{
.name = "aec62xx",
.set = 1,
......
......@@ -15,7 +15,7 @@ static u8 ali_proc;
static int ali_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t ali_procs[] __initdata = {
static ide_pci_host_proc_t ali_procs[] = {
{
.name = "ali",
.set = 1,
......
......@@ -15,7 +15,7 @@ static u8 amd74xx_proc;
static int amd74xx_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t amd74xx_procs[] __initdata = {
static ide_pci_host_proc_t amd74xx_procs[] = {
{
.name = "amd74xx",
.set = 1,
......
......@@ -69,7 +69,7 @@ static u8 cmd64x_proc;
static char * print_cmd64x_get_info(char *, struct pci_dev *, int);
static int cmd64x_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t cmd64x_procs[] __initdata = {
static ide_pci_host_proc_t cmd64x_procs[] = {
{
.name = "cmd64x",
.set = 1,
......
......@@ -15,7 +15,7 @@ static u8 cs5520_proc;
static int cs5520_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t cs5520_procs[] __initdata = {
static ide_pci_host_proc_t cs5520_procs[] = {
{
.name = "cs5520",
.set = 1,
......
......@@ -15,7 +15,7 @@ static u8 cs5530_proc;
static int cs5530_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t cs5530_procs[] __initdata = {
static ide_pci_host_proc_t cs5530_procs[] = {
{
.name = "cs5530",
.set = 1,
......
......@@ -21,7 +21,7 @@ static u8 hpt34x_proc;
static int hpt34x_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t hpt34x_procs[] __initdata = {
static ide_pci_host_proc_t hpt34x_procs[] = {
{
.name = "hpt34x",
.set = 1,
......
......@@ -424,7 +424,7 @@ static u8 hpt366_proc;
static int hpt366_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t hpt366_procs[] __initdata = {
static ide_pci_host_proc_t hpt366_procs[] = {
{
.name = "hpt366",
.set = 1,
......
......@@ -172,7 +172,7 @@ static u8 pdcnew_proc;
static int pdcnew_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t pdcnew_procs[] __initdata = {
static ide_pci_host_proc_t pdcnew_procs[] = {
{
.name = "pdcnew",
.set = 1,
......
......@@ -207,7 +207,7 @@ static u8 pdc202xx_proc;
static int pdc202xx_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t pdc202xx_procs[] __initdata = {
static ide_pci_host_proc_t pdc202xx_procs[] = {
{
.name = "pdc202xx",
.set = 1,
......
......@@ -17,7 +17,7 @@ static u8 piix_proc;
static int piix_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t piix_procs[] __devinitdata = {
static ide_pci_host_proc_t piix_procs[] = {
{
.name = "piix",
.set = 1,
......
......@@ -15,7 +15,7 @@ static u8 sc1200_proc;
static int sc1200_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t sc1200_procs[] __initdata = {
static ide_pci_host_proc_t sc1200_procs[] = {
{
.name = "sc1200",
.set = 1,
......
......@@ -31,7 +31,7 @@ static u8 svwks_proc;
static int svwks_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t svwks_procs[] __initdata = {
static ide_pci_host_proc_t svwks_procs[] = {
{
.name = "svwks",
.set = 1,
......
......@@ -31,7 +31,7 @@ static int siimage_get_info(char *, char **, off_t, int);
static u8 siimage_proc;
static ide_pci_host_proc_t siimage_procs[] __initdata = {
static ide_pci_host_proc_t siimage_procs[] = {
{
.name = "siimage",
.set = 1,
......
......@@ -15,7 +15,7 @@ static u8 sis_proc;
static int sis_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t sis_procs[] __initdata = {
static ide_pci_host_proc_t sis_procs[] = {
{
.name = "sis",
.set = 1,
......
......@@ -17,7 +17,7 @@ static u8 slc90e66_proc;
static int slc90e66_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t slc90e66_procs[] __initdata = {
static ide_pci_host_proc_t slc90e66_procs[] = {
{
.name = "slc90e66",
.set = 1,
......
......@@ -17,7 +17,7 @@ static void init_hwif_triflex(ide_hwif_t *);
#ifdef CONFIG_PROC_FS
static int triflex_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t triflex_proc __initdata = {
static ide_pci_host_proc_t triflex_proc = {
.name = "triflex",
.set = 1,
.get_info = triflex_get_info,
......
......@@ -15,7 +15,7 @@ static u8 via_proc;
static int via_get_info(char *, char **, off_t, int);
static ide_pci_host_proc_t via_procs[] __initdata = {
static ide_pci_host_proc_t via_procs[] = {
{
.name = "via",
.set = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment