Thanks for the reply, and yes, I'm just doing this for debugging. I defined both of the macros to no-ops (0x00, right?), and it still failed to remove the module.
Fortunately, I fixed the crashing, but I'd still like a solution for future issues. I read the online book that you'd linked, and ioctl doesn't sound like the best solution for the problem, perhaps I'm not implementing it right? I found the following code:
Is there a way to make this run automatically, on start?
while (MOD_IN_USE) MOD_DEC_USE_COUNT; MOD_INC_USE_COUNT;