s5p-mfc: Add release callback for memory region devs
authorJavier Martinez Canillas <javier@osg.samsung.com>
Tue, 3 May 2016 20:27:17 +0000 (16:27 -0400)
committerSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 3 Jun 2016 09:11:47 +0000 (11:11 +0200)
commit6311f1261f59ce5e51fbe5cc3b5e7737197316ac
tree84493efe300ac6f824e32104ba9c25a22965e4a5
parent29debab0a94035a390801d1f177d171d014b7765
s5p-mfc: Add release callback for memory region devs

When s5p_mfc_remove() calls put_device() for the reserved memory region
devs, the driver core warns that the dev doesn't have a release callback:

WARNING: CPU: 0 PID: 591 at drivers/base/core.c:251 device_release+0x8c/0x90
Device 's5p-mfc-l' does not have a release() function, it is broken and must be fixed.

Also, the declared DMA memory using dma_declare_coherent_memory() isn't
relased so add a dev .release that calls dma_release_declared_memory().

Cc: <stable@vger.kernel.org>
Fixes: 6e83e6e25eb4 ("[media] s5p-mfc: Fix kernel warning on memory init")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c