2013/4/8 Ville Syrjälä ville.syrjala@linux.intel.com:
*sads = kzalloc(count * sizeof(*sads), GFP_KERNEL);
Still looks a bit wrong.
kcalloc(count, sizeof(**sads), GFP_KERNEL);
Also a minor nit, but the scope of some variables is needlessly large. db and dbl are only needed inside the outer loop, and count is only needed inside the 'if (... == AUDIO_BLOCK)' block. But this is not a big deal, so feel free to ignore me on this point if you're feeling lazy :)
+#define SAD_FORMAT_WMA_PRO 0x0e
We already have names for these in include/linux/hdmi.h. No need to duplicate them here.
Thanks for your comments Ville! I appreciate that :)