Re: [PATCH] link errors with internal calls to devexit functions

Legacy Fishtank (garzik@havoc.gtf.org)
Tue, 25 Dec 2001 12:59:48 -0500


On Sat, Dec 22, 2001 at 04:05:43PM +1100, Keith Owens wrote:
> >--- 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
> I don't like #if defined(MODULE) || defined(CONFIG_HOTPLUG) in open
> code.

1000.0% agreed

> __devexit_call(bttv_remove(dev));
> __devexit_call(uhci_pci_remove(dev));

ug... Just use plain logic: if a function is called from non-devexit
code, it should not be marked devexit. That's the bug, we don't need
new API crud.

Jeff

-
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/