projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
536e171
)
gpu: host1x: Call host1x_device_add() under lock
author
Thierry Reding
<
[email protected]
>
Thu, 18 Dec 2014 14:06:56 +0000
(15:06 +0100)
committer
Thierry Reding
<
[email protected]
>
Fri, 23 Jan 2015 11:07:01 +0000
(12:07 +0100)
Instead of locking within host1x_device_add(), call it under the lock to
make the locking more consistent.
Signed-off-by: Thierry Reding <
[email protected]
>
drivers/gpu/host1x/bus.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/host1x/bus.c
b/drivers/gpu/host1x/bus.c
index e4182e68e29caf00012b449897ac6e2439d93b6b..769116dba797882ea95bf2dca0498ed8a97f9d88 100644
(file)
--- a/
drivers/gpu/host1x/bus.c
+++ b/
drivers/gpu/host1x/bus.c
@@
-323,9
+323,7
@@
static int host1x_device_add(struct host1x *host1x,
return err;
}
- mutex_lock(&host1x->devices_lock);
list_add_tail(&device->list, &host1x->devices);
- mutex_unlock(&host1x->devices_lock);
mutex_lock(&clients_lock);
@@
-414,11
+412,11
@@
static void host1x_attach_driver(struct host1x *host1x,
}
}
- mutex_unlock(&host1x->devices_lock);
-
err = host1x_device_add(host1x, driver);
if (err < 0)
dev_err(host1x->dev, "failed to allocate device: %d\n", err);
+
+ mutex_unlock(&host1x->devices_lock);
}
static void host1x_detach_driver(struct host1x *host1x,