mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
UPSTREAM: gpu: host1x: Make host1x_client_unregister() return void
This function returned zero unconditionally. Make it return no value and simplify all callers accordingly. Bug 4303860 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Thierry Reding <treding@nvidia.com> Change-Id: I07bf696e8af7c3472355b52549fb43ff3987c108 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2986788 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
4df331c666
commit
ee866593b7
@@ -3267,12 +3267,7 @@ static int tegra_dc_remove(struct platform_device *pdev)
|
|||||||
struct tegra_dc *dc = platform_get_drvdata(pdev);
|
struct tegra_dc *dc = platform_get_drvdata(pdev);
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = host1x_client_unregister(&dc->client);
|
host1x_client_unregister(&dc->client);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = tegra_dc_rgb_remove(dc);
|
err = tegra_dc_rgb_remove(dc);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
|||||||
@@ -1662,16 +1662,10 @@ mipi_free:
|
|||||||
static int tegra_dsi_remove(struct platform_device *pdev)
|
static int tegra_dsi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct tegra_dsi *dsi = platform_get_drvdata(pdev);
|
struct tegra_dsi *dsi = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
err = host1x_client_unregister(&dsi->client);
|
host1x_client_unregister(&dsi->client);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
tegra_output_remove(&dsi->output);
|
tegra_output_remove(&dsi->output);
|
||||||
|
|
||||||
|
|||||||
@@ -294,16 +294,10 @@ static int gr2d_probe(struct platform_device *pdev)
|
|||||||
static int gr2d_remove(struct platform_device *pdev)
|
static int gr2d_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct gr2d *gr2d = platform_get_drvdata(pdev);
|
struct gr2d *gr2d = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
err = host1x_client_unregister(&gr2d->client.base);
|
host1x_client_unregister(&gr2d->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -553,16 +553,10 @@ static int gr3d_probe(struct platform_device *pdev)
|
|||||||
static int gr3d_remove(struct platform_device *pdev)
|
static int gr3d_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct gr3d *gr3d = platform_get_drvdata(pdev);
|
struct gr3d *gr3d = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
err = host1x_client_unregister(&gr3d->client.base);
|
host1x_client_unregister(&gr3d->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1893,18 +1893,12 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
|
|||||||
static int tegra_hdmi_remove(struct platform_device *pdev)
|
static int tegra_hdmi_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct tegra_hdmi *hdmi = platform_get_drvdata(pdev);
|
struct tegra_hdmi *hdmi = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
#if !(LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0))
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
err = host1x_client_unregister(&hdmi->client);
|
host1x_client_unregister(&hdmi->client);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
tegra_output_remove(&hdmi->output);
|
tegra_output_remove(&hdmi->output);
|
||||||
|
|
||||||
|
|||||||
@@ -1178,13 +1178,8 @@ static int tegra_display_hub_remove(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct tegra_display_hub *hub = platform_get_drvdata(pdev);
|
struct tegra_display_hub *hub = platform_get_drvdata(pdev);
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int err;
|
|
||||||
|
|
||||||
err = host1x_client_unregister(&hub->client);
|
host1x_client_unregister(&hub->client);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < hub->soc->num_wgrps; i++) {
|
for (i = 0; i < hub->soc->num_wgrps; i++) {
|
||||||
struct tegra_windowgroup *wgrp = &hub->wgrps[i];
|
struct tegra_windowgroup *wgrp = &hub->wgrps[i];
|
||||||
@@ -1194,7 +1189,7 @@ static int tegra_display_hub_remove(struct platform_device *pdev)
|
|||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
return err;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct tegra_display_hub_soc tegra186_display_hub = {
|
static const struct tegra_display_hub_soc tegra186_display_hub = {
|
||||||
|
|||||||
@@ -870,12 +870,7 @@ static int nvdec_remove(struct platform_device *pdev)
|
|||||||
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
||||||
err);
|
err);
|
||||||
|
|
||||||
err = host1x_client_unregister(&nvdec->client.base);
|
host1x_client_unregister(&nvdec->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
falcon_exit(&nvdec->falcon);
|
falcon_exit(&nvdec->falcon);
|
||||||
|
|
||||||
|
|||||||
@@ -736,12 +736,7 @@ static int nvenc_remove(struct platform_device *pdev)
|
|||||||
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
||||||
err);
|
err);
|
||||||
|
|
||||||
err = host1x_client_unregister(&nvenc->client.base);
|
host1x_client_unregister(&nvenc->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
falcon_exit(&nvenc->falcon);
|
falcon_exit(&nvenc->falcon);
|
||||||
|
|
||||||
|
|||||||
@@ -723,12 +723,7 @@ static int nvjpg_remove(struct platform_device *pdev)
|
|||||||
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
||||||
err);
|
err);
|
||||||
|
|
||||||
err = host1x_client_unregister(&nvjpg->client.base);
|
host1x_client_unregister(&nvjpg->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
falcon_exit(&nvjpg->falcon);
|
falcon_exit(&nvjpg->falcon);
|
||||||
|
|
||||||
|
|||||||
@@ -383,16 +383,10 @@ exit_falcon:
|
|||||||
static int ofa_remove(struct platform_device *pdev)
|
static int ofa_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct ofa *ofa = platform_get_drvdata(pdev);
|
struct ofa *ofa = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
err = host1x_client_unregister(&ofa->client.base);
|
host1x_client_unregister(&ofa->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
falcon_exit(&ofa->falcon);
|
falcon_exit(&ofa->falcon);
|
||||||
|
|
||||||
|
|||||||
@@ -3993,14 +3993,8 @@ put_aux:
|
|||||||
static int tegra_sor_remove(struct platform_device *pdev)
|
static int tegra_sor_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct tegra_sor *sor = platform_get_drvdata(pdev);
|
struct tegra_sor *sor = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
|
|
||||||
err = host1x_client_unregister(&sor->client);
|
host1x_client_unregister(&sor->client);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
pm_runtime_disable(&pdev->dev);
|
pm_runtime_disable(&pdev->dev);
|
||||||
|
|
||||||
|
|||||||
@@ -804,12 +804,7 @@ static int vic_remove(struct platform_device *pdev)
|
|||||||
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
dev_info(&pdev->dev, "failed to unregister host1x actmon: %d\n",
|
||||||
err);
|
err);
|
||||||
|
|
||||||
err = host1x_client_unregister(&vic->client.base);
|
host1x_client_unregister(&vic->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
falcon_exit(&vic->falcon);
|
falcon_exit(&vic->falcon);
|
||||||
|
|
||||||
|
|||||||
@@ -527,7 +527,6 @@ unregister_client:
|
|||||||
static int virt_engine_remove(struct platform_device *pdev)
|
static int virt_engine_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct virt_engine *virt_engine = platform_get_drvdata(pdev);
|
struct virt_engine *virt_engine = platform_get_drvdata(pdev);
|
||||||
int err;
|
|
||||||
#ifndef CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
#ifndef CONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||||
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
||||||
u32 hwpm_ip_index = virt_engine_get_ip_index(pdev->name);
|
u32 hwpm_ip_index = virt_engine_get_ip_index(pdev->name);
|
||||||
@@ -547,12 +546,7 @@ static int virt_engine_remove(struct platform_device *pdev)
|
|||||||
virt_engine_cleanup_actmon_debugfs(virt_engine);
|
virt_engine_cleanup_actmon_debugfs(virt_engine);
|
||||||
virt_engine_cleanup();
|
virt_engine_cleanup();
|
||||||
|
|
||||||
err = host1x_client_unregister(&virt_engine->client.base);
|
host1x_client_unregister(&virt_engine->client.base);
|
||||||
if (err < 0) {
|
|
||||||
dev_err(&pdev->dev, "failed to unregister host1x client: %d\n",
|
|
||||||
err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -808,7 +808,7 @@ EXPORT_SYMBOL(__host1x_client_register);
|
|||||||
* Removes a host1x client from its host1x controller instance. If a logical
|
* Removes a host1x client from its host1x controller instance. If a logical
|
||||||
* device has already been initialized, it will be torn down.
|
* device has already been initialized, it will be torn down.
|
||||||
*/
|
*/
|
||||||
int host1x_client_unregister(struct host1x_client *client)
|
void host1x_client_unregister(struct host1x_client *client)
|
||||||
{
|
{
|
||||||
struct host1x_client *c;
|
struct host1x_client *c;
|
||||||
struct host1x *host1x;
|
struct host1x *host1x;
|
||||||
@@ -820,7 +820,7 @@ int host1x_client_unregister(struct host1x_client *client)
|
|||||||
err = host1x_del_client(host1x, client);
|
err = host1x_del_client(host1x, client);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
mutex_unlock(&devices_lock);
|
mutex_unlock(&devices_lock);
|
||||||
return 0;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -837,8 +837,6 @@ int host1x_client_unregister(struct host1x_client *client)
|
|||||||
mutex_unlock(&clients_lock);
|
mutex_unlock(&clients_lock);
|
||||||
|
|
||||||
host1x_bo_cache_destroy(&client->cache);
|
host1x_bo_cache_destroy(&client->cache);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(host1x_client_unregister);
|
EXPORT_SYMBOL(host1x_client_unregister);
|
||||||
|
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ int __host1x_client_register(struct host1x_client *client);
|
|||||||
__host1x_client_register(client); \
|
__host1x_client_register(client); \
|
||||||
})
|
})
|
||||||
|
|
||||||
int host1x_client_unregister(struct host1x_client *client);
|
void host1x_client_unregister(struct host1x_client *client);
|
||||||
|
|
||||||
int host1x_client_suspend(struct host1x_client *client);
|
int host1x_client_suspend(struct host1x_client *client);
|
||||||
int host1x_client_resume(struct host1x_client *client);
|
int host1x_client_resume(struct host1x_client *client);
|
||||||
|
|||||||
Reference in New Issue
Block a user