]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Fix host1x driver shutdown
authorThierry Reding <treding@nvidia.com>
Wed, 22 Mar 2017 18:15:18 +0000 (19:15 +0100)
committerThierry Reding <treding@nvidia.com>
Wed, 5 Apr 2017 16:11:50 +0000 (18:11 +0200)
commit2bf60f16e2e4ceed31e686d3ee00db6e66b42d30
tree9afb540bbe407ca6e5b1e74dab1db3a9418644bf
parent96b1c47b7a8f32476d896eb09087dc4bf35336d8
gpu: host1x: Fix host1x driver shutdown

Shutting down a host1x device currently crashes if the device has failed
to probe. The root cause is that the host1x shutdown is implemented as a
struct bus_type callback, but in turn relies on the driver bound to the
device. On failure to probe, no driver will be bound and cause the code
to crash.

Fix this by moving the ->probe(), ->remove() and ->shutdown() callbacks
to the driver rather than the bus.

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