2003-03-21 15:47:27

by Ronald S. Bultje

[permalink] [raw]
Subject: i2c_inc/dec_use_client in 2.5.x?

Hey,

what happened to above-mentioned functions? Well, yes, I can see that
they're removed in 2.5.65 (probably earlier, I can't find them in any
2.5.x version), but why? Aren't the i2c client modules supposed to keep
their use count dynamically anymore? i2c_client->inc/dec_use are gone
too...

I had a short look at the saa7111 file (drivers/media/video/saa7111.c),
and it seems to keep use count in the attach/detach callbacks. Is this
the way to go? In the documentation (probably from 2.4.x), developers
were told this was stupid (Documentation/i2c/writing-clients). What's
the current 'policy'?

Thanks,

Ronald
(please CC, I'm not subscribed)

--
Ronald Bultje <[email protected]>
Linux Video/Multimedia developer


2003-03-21 15:57:08

by Christoph Hellwig

[permalink] [raw]
Subject: Re: i2c_inc/dec_use_client in 2.5.x?

On Fri, Mar 21, 2003 at 04:57:44PM +0100, Ronald Bultje wrote:
> Hey,
>
> what happened to above-mentioned functions? Well, yes, I can see that
> they're removed in 2.5.65 (probably earlier, I can't find them in any
> 2.5.x version), but why? Aren't the i2c client modules supposed to keep
> their use count dynamically anymore? i2c_client->inc/dec_use are gone
> too...

use try_module_get/module_put on ->owner.