> As a comment in the other thread said you should not set it multiple times, > probably the best solution is to: > (a) check if dev->dma_parms is already set, and if not: > (b) allocate using plain kzalloc() (with a comment why!), > (c) not free the memory nor reset dev->dma_parms (with a comment why!). Quite clumsy if done per driver, or? If this is the intended behaviour, then there is something to improve with the dma_params API, or? If something which is meant to have a lifecycle same as the device but needs to get set during probe/remove lifecycle, this calls for at least a helper function which hides all these details?
Attachment:
signature.asc
Description: PGP signature