Skip to contentSkip to conversation

regmap module_put usage.

DISCUSSION Jonathan Cameron 2 participants 3 messages Sep 5, 2011

lore
Share & tools
lore
#0 lore raw

Hi Mark,

I'm playing around with converting an IIO driver over to regmap (to get a feel for when it makes sense and when it doesn't).

Right now, calling regmap_exit() results in a module_put of the regmap-spi module which never has a module_get and hence it's module use count wraps around and all hell breaks loose?

Am I missing something about where that get should occur?

It's entirely plausible I just have a local bug but I right now I can't see how the logic is supposed to function!

Thanks,

Jonathan

#1 lore raw
Quoted 3 lines · Jonathan Cameron

Right now, calling regmap_exit() results in a module_put of the regmap-spi module which never has a module_get and hence it's module use count wraps around and all hell breaks loose?

Oh, that's a bit of bitrot from a last minute reorg. I'll fix it.

#2 lore raw
Quoted 8 lines · Mark Brown
Quoted 3 lines · Jonathan Cameron

Right now, calling regmap_exit() results in a module_put of the regmap-spi module which never has a module_get and hence it's module use count wraps around and all hell breaks loose?

Oh, that's a bit of bitrot from a last minute reorg. I'll fix it.

Thanks, I just scrapped the calls as any module will be dependent statically on the relevant regmap-bus.c file anyway.