]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: Allocate resources at probe time
authorThierry Reding <treding@nvidia.com>
Mon, 14 Oct 2013 12:26:42 +0000 (14:26 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 31 Oct 2013 08:55:41 +0000 (09:55 +0100)
commite38bc4d89b83d7671ea2c0e7bc5a5e498ec74a8a
tree47158501586464399b9dd50da13cb7265166d7d3
parent3110b3b83afdd95fed4da119b0e648060bcdc557
drm/tegra: Allocate resources at probe time

Since the .init() and .exit() functions are executed whenever the DRM
driver is loaded or unloaded, care must be taken not to use them for
resource allocation. Otherwise deferred probing cannot be used, since
the .init() and .exit() are not run at probe time. Similarly the code
that frees resources must be run at .remove() time. If it is run from
the .exit() function, it can release resources multiple times.

To handle this more consistently, rename the tegra_output_parse_dt()
function to tegra_output_probe() and introduce tegra_output_remove()
which can be used to free output-related resources.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/drm.h
drivers/gpu/drm/tegra/hdmi.c
drivers/gpu/drm/tegra/output.c
drivers/gpu/drm/tegra/rgb.c