Thanks for pointing that out this seems to be the reason why the usecount never got increased twice when attaching it for my hybrid devices. I added some error checking to it and fixed the em2880-dvb driver which alrso relies on it thanks. Markus On 5/7/07, Trent Piepho <xyzzy@xxxxxxxxxxxxx> wrote:
On Mon, 7 May 2007, System Administrator wrote: > On Mon, 2007-05-07 at 06:20 +1000, System Administrator wrote: > > I think that the bug is that xc3028_attach is returning 0 to indicate > > success whereas dvb_attach() is treating 0 as failure? > > Hello again, > > I have verified that this is indeed what is happening. xc3028_tuner > should be returning a pointer on success, not 0. Here's a patch to fix > that. You're right, dvb_attach() expects the function will return a pointer, so NULL == failure. dvb_attach() does a symbol_put() on failure, but not on success, since it needs to keep a reference to the module it attached to. It's important that symbol_get() (via symbol_request) is called _before_ the attach function is called, and that symbol_put() is called _after_ the release function. _______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
-- Markus Rechberger _______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb