• Federico Vaga's avatar
    sw:drv: do not use devm_* · e52fec7c
    Federico Vaga authored
    It looks like there is a bug somewhere that make the system panic
    on resource releasing. I can't provide any evidence that devm_* is
    related to the issue, but removing it seems to solve the problem
    (or at least is not as frequent as before: I can load/unload 100 times
    without problems).
    
    The problem was mitigated also by introducing delays (mdelay/printk)
    in the fcl/gpio remove functions.
    
    My guess is that MFD removal and devres clean up conflicts at some
    point. MFD uses platform_unregister() which does resource_release(),
    and because of devres, only after that we will release all resources
    that we took on probe(). The flow does not sound right, we should
    release resources we took **before** platform releases/remove the
    resource from the system (not viceversa).
    Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
    e52fec7c
Name
Last commit
Last update
..
platform_data Loading commit data...
.gitignore Loading commit data...
Kbuild Loading commit data...
Makefile Loading commit data...
gn412x-fcl.c Loading commit data...
gn412x-gpio.c Loading commit data...
gn412x.h Loading commit data...
spec-compat.c Loading commit data...
spec-compat.h Loading commit data...
spec-core-fpga.c Loading commit data...
spec-core.c Loading commit data...
spec-gn412x-dma.c Loading commit data...
spec.h Loading commit data...