-
- Downloads
mfd: Stop setting refcounting pointers in original mfd_cell arrays
Commit 1e29af62 ("mfd: Add refcounting support to mfd_cells") had to drop the "const" keyword on the "cell" parameter of mfd_add_devices(), as it added the refcounting pointers to the objects of the passed mfd_cell array itself. However, the mfd core code operates on copies of the mfd_cell objects, so there's no need to modify the originally passed objects. Hence, move the setting of the refcounting pointers from mfd_add_devices() to mfd_platform_add_cell(), where the copy of the mfd_cell objects is made. mfd_clone_cell() can just pass (a copy of) the original usage_count pointer. This allows to make the "cell" parameter of mfd_add_devices() "const" again, and avoids future race conditions when registering multiple instances of the same device in parallel. Signed-off-by:Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
Loading
-
Mentioned in commit 28397dc9
-
Mentioned in commit 6bbb3c4c
-
Mentioned in commit c8f675ff
-
Mentioned in commit ad59de48
-
Mentioned in commit afb580a9
-
Mentioned in commit 04e02417
-
Mentioned in commit 7c0517b1
-
Mentioned in commit cf3c7cf6
-
Mentioned in commit 2977dc92
-
Mentioned in commit 5ac98553
-
Mentioned in commit 30fe2b5b
Please register or sign in to comment