]> asedeno.scripts.mit.edu Git - linux.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)
commitb0d36daa0ab54714e05164f6e21d22f974a5eec1
tree9afb540bbe407ca6e5b1e74dab1db3a9418644bf
parentb386c6b73ac6c2a9a2f1201d055ab65cc19890a2
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