Skip to contentSkip to conversation

MOD_*_USE_COUNT

DISCUSSION Jean Delvare 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Hi all,

While writing the i2c-2.8.1 patch I plan to send to the kernel people for inclusion into Linux 2.4, I made sure not to leave any MOD_*_USE_COUNT call in, since in my understanding, the owner structure member in i2c_algorithm, i2c_adapter and i2c_driver was precisely introduced to get rid of them.

Now, taking a look at what was done in the 2.6 kernel tree, it happens that a few drivers still have these macros used. For example, they are still used in bt832.c, bttv-if.c and tuner-3036.c. Does it mean that I should *not* have been removing them there? Should I have been removing these calls only if they were explicitely linked to our structures through inc_use and dec_use structure members? Or is it simply that they should have been removed in 2.6, but have been forgotten?

Explanations would be welcome.
Thanks.

Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
#1 lore raw
Quoted 8 lines · Jean Delvare

Hi all,

While writing the i2c-2.8.1 patch I plan to send to the kernel people for inclusion into Linux 2.4, I made sure not to leave any MOD_*_USE_COUNT call in, since in my understanding, the owner structure member in i2c_algorithm, i2c_adapter and i2c_driver was precisely introduced to get rid of them.

Exactly.

Quoted 7 lines

Now, taking a look at what was done in the 2.6 kernel tree, it happens that a few drivers still have these macros used. For example, they are still used in bt832.c, bttv-if.c and tuner-3036.c. Does it mean that I should *not* have been removing them there? Should I have been removing these calls only if they were explicitely linked to our structures through inc_use and dec_use structure members? Or is it simply that they should have been removed in 2.6, but have been forgotten?

They should have been removed, and I've just created a patch to do so and will send it to Linus in a bit.

thanks,

greg k-h