Re: [3C509] Fix sysfs leak.

From: Dave Jones
Date: Tue Mar 16 2004 - 11:32:45 EST


On Tue, Mar 16, 2004 at 05:05:45PM +0100, Marc Zyngier wrote:
> #ifdef CONFIG_MCA
> mca_register_driver(&el3_mca_driver);
> #endif
> - return el3_cards ? 0 : -ENODEV;
> + return 0;
> }
>
> static void __exit el3_cleanup_module(void)
>
> This is not pretty either, but 3c579 probing will work, and in your
> case it won't leave a dangling directory in sysfs.

Yes, leaving the module around, and cleaning up at rmmod time should
also work. I'll test it in a while to be sure.

> Dave> Why is this even an issue so late on? Bus probing should have
> Dave> been done as part of bootup. By the time I get to modprobing
> Dave> device drivers, it should have been determined already.
>
> Modprobing is perfectly OK, and indeed everything has been probed at
> this stage.

Clearly it hadn't, or otherwise modprobing 3c509 would have failed
due to the lack of an eisa bus.

> But having built-in drivers raises a few different
> problems (the driver may be initialized before all busses are probed).

There were no built-in drivers in this case.

Dave

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