firmware: raspberrypi: Keep count of all consumers
When unbinding the firmware device we need to make sure it has no consumers left. Otherwise we'd leave them with a firmware handle pointing at freed memory. Keep a reference count of all consumers and introduce rpi_firmware_put() which will permit automatically decrease the reference count upon unbinding consumer drivers. Suggested-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NNicolas Saenz Julienne <nsaenzjulienne@suse.de> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Reviewed-by: NStephen Boyd <sboyd@kernel.org> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
Showing
想要评论请 注册 或 登录