]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tegra: gr2d: Miscellaneous cleanups
authorThierry Reding <treding@nvidia.com>
Thu, 26 Sep 2013 14:09:43 +0000 (16:09 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 31 Oct 2013 08:20:09 +0000 (09:20 +0100)
commit984381533205c7a45449670cd6e48d0a6babd0d2
tree8a104988b608fffd2d7332b6b77c9e302439d0e1
parent986a15206c7c60de5b5149f8376354d04ef51ac1
drm/tegra: gr2d: Miscellaneous cleanups

Rework the address table code for the host1x firewall. The previous
implementation allocated a bitfield but didn't check for a valid pointer
so it could potentially crash. Instead, embed a static bitmap within the
gr2d structure to avoid the allocation and use the Linux bitmap API to
reduce code complexity.

Don't annotate the driver's .remove() function __exit. Even if built in
the driver can be unloaded via sysfs, so .remove() needs to stick around
after initialization. Also remove the explicit initialization of the
driver's .owner field to THIS_MODULE because that's now handled by the
driver core.

Furthermore make an error message more consistent with other subdrivers,
index the syncpts array for better readability, remove a gratuituous
newline and reorder some variable declarations to make the code easier
to read.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/drm/gr2d.c