After the switch to use v4l2_async_notifier_add_subdev() and
v4l2_async_notifier_cleanup(), unloading the ti_cal module would cause a
kernel oops.
This was root cause to the fact that v4l2_async_notifier_cleanup() tries
to kfree the asd pointer passed into v4l2_async_notifier_add_subdev().
In our case the asd reference was from a statically allocated struct.
So in effect v4l2_async_notifier_cleanup() was trying to free a pointer
that was not kalloc.
So here we switch to using a kzalloc struct instead of a static one.
To achieve this we re-order some of the calls to prevent asd allocation
from leaking.
Fixes:
|
||
|---|---|---|
| .. | ||
| cal.c | ||
| cal_regs.h | ||
| csc.c | ||
| csc.h | ||
| Makefile | ||
| sc.c | ||
| sc.h | ||
| sc_coeff.h | ||
| vpdma.c | ||
| vpdma.h | ||
| vpdma_priv.h | ||
| vpe.c | ||
| vpe_regs.h | ||