Messages in this thread | | | Date | Sat, 22 Dec 2001 10:04:19 +0100 (CET) | From | Kai Germaschewski <> | Subject | Re: [PATCH] link errors with internal calls to devexit functions |
| |
On Sat, 22 Dec 2001, Keith Owens wrote:
> >diff -ur linux-2.4.17.orig/drivers/media/video/bttv-driver.c linux-2.4.17/drivers/media/video/bttv-driver.c > >--- linux-2.4.17.orig/drivers/media/video/bttv-driver.c Sat Dec 22 13:39:39 2001 > >+++ linux-2.4.17/drivers/media/video/bttv-driver.c Sat Dec 22 13:46:02 2001 > >@@ -2992,7 +2992,9 @@ > > pci_set_drvdata(dev,btv); > > > > if(init_bt848(btv) < 0) { > >+#if defined(MODULE) || defined(CONFIG_HOTPLUG) > > bttv_remove(dev); > >+#endif > > return -EIO; > > } > > bttv_num++;
> I don't like #if defined(MODULE) || defined(CONFIG_HOTPLUG) in open > code. If the rules for what gets discarded change (again) then those > ifdefs will be out of sync. That is why __devexit_p() is a wrapper, it > is defined once and only has to be changed once when the rules change. > > Define a __devexit_call wrapper in include/linux/init.h at the same > place that __devexit_p is defined and use the wrapper around the calls. > Untested.
I'd rather think that the patch (and the original code) is broken, as it seems we call an __devexit function from an init function. So the correct fix is to remove the __devexit attribute from the offending functions.
--Kai
- 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/
| |