lkml.org 
[lkml]   [2002]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] Fix .text.exit error with static compile of synclinkmp.c
On Thu, 5 Sep 2002, Christoph Hellwig wrote:

> > The problem is that the __exit function synclinkmp_remove_one is referred
> > to in "static struct pci_driver synclinkmp_pci_driver".
> >
> > The fix is simple:
>
> And wrong. Please use __devexit_p() instead.


Yes, that sounds like a better idea. What about the following patch?


--- drivers/char/synclinkmp.c.old 2002-09-05 21:29:11.000000000 +0200
+++ drivers/char/synclinkmp.c 2002-09-05 21:33:32.000000000 +0200
@@ -506,8 +506,8 @@
static char *driver_name = "SyncLink MultiPort driver";
static char *driver_version = "$Revision: 3.17 $";

-static int __init synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent);
-static void __exit synclinkmp_remove_one(struct pci_dev *dev);
+static int __devinit synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent);
+static void __devexit synclinkmp_remove_one(struct pci_dev *dev);

static struct pci_device_id synclinkmp_pci_tbl[] __devinitdata = {
{ PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_SCA, PCI_ANY_ID, PCI_ANY_ID, },
@@ -519,7 +519,7 @@
name: "synclinkmp",
id_table: synclinkmp_pci_tbl,
probe: synclinkmp_init_one,
- remove: synclinkmp_remove_one,
+ remove: __devexit_p(synclinkmp_remove_one),
};


@@ -5595,8 +5595,8 @@
}


-static int __init synclinkmp_init_one (struct pci_dev *dev,
- const struct pci_device_id *ent)
+static int __devinit synclinkmp_init_one (struct pci_dev *dev,
+ const struct pci_device_id *ent)
{
if (pci_enable_device(dev)) {
printk("error enabling pci device %p\n", dev);
@@ -5606,6 +5606,6 @@
return 0;
}

-static void __exit synclinkmp_remove_one (struct pci_dev *dev)
+static void __devexit synclinkmp_remove_one (struct pci_dev *dev)
{
}
cu
Adrian

--

You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
Alan Cox


-
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 13:28    [W:0.050 / U:1.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site