“1c57d554561cb5f5be9286ebc4fa44db7e1139db”上不存在“...fleet/git@gitcode.net:Crayonxin2000/Paddle.git”
提交 38d98de4 编写于 作者: T Thierry Reding

gpu: host1x: Call host1x_device_add() under lock

Instead of locking within host1x_device_add(), call it under the lock to
make the locking more consistent.
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 536e1715
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册