Clean up of magic allocators/casts
Hi,
I applied big patches to clean up the magic allocator/cast and snd_kcalloc() stuff on ALSA CVS tree.
If you have a local driver code, please correct as the following:
- Replace snd_kcalloc() with kcalloc()
kcalloc() takes three arguments, two for the normal calloc() and the third one as the GFP_* flag.
- Replace snd_magic_kmalloc(), snd_magic_kcalloc(), snd_magic_kfree() with kmalloc(), kcalloc() and kfree(), respectively. Also, replace snd_magic_cast() with the normal cast.
The magic-cast check facility is no longer provided on ALSA tree to simplify the code base.
- _snd_pcm_substream_chip(), _snd_timer_chip() are _snd_control_chip() replaced with the one without the first underscore
(e.g. snd_pcm_substream_chip()).
- No longer need to define chip_t.
Because we don't have magic-cast, it's useless now.
After CVS update, please run cvscompile to rebuild the configure script.
If someone still wants a magic-cast check, I'll consider to provide in a different way (without implementing it implicitly in the allocator), but it won't appear in alsa-kernel tree but only in alsa-driver tree anyway.
thanks,
Takashi
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com