Skip to content

Commit bbecb57

Browse files
committed
Merge tag 'exynos-drm-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
Two cleanups - Drop .owner from platform_driver declaration of each exynos drm module. - Drop the cleanup code to device_node object in exynos_hdmi.c using the scope-based resource management feature[1]. [1] https://lwn.net/Articles/934679/?ref=upstract.com Signed-off-by: Dave Airlie <[email protected]> From: Inki Dae <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents bfed5b0 + d65bfb9 commit bbecb57

11 files changed

+5
-21
lines changed

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ struct platform_driver dsi_driver = {
184184
.remove_new = samsung_dsim_remove,
185185
.driver = {
186186
.name = "exynos-dsi",
187-
.owner = THIS_MODULE,
188187
.pm = &samsung_dsim_pm_ops,
189188
.of_match_table = exynos_dsi_of_match,
190189
},

drivers/gpu/drm/exynos/exynos_drm_fimc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,6 @@ struct platform_driver fimc_driver = {
14121412
.driver = {
14131413
.of_match_table = fimc_of_match,
14141414
.name = "exynos-drm-fimc",
1415-
.owner = THIS_MODULE,
14161415
.pm = pm_ptr(&fimc_pm_ops),
14171416
},
14181417
};

drivers/gpu/drm/exynos/exynos_drm_fimd.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,6 @@ struct platform_driver fimd_driver = {
13261326
.remove_new = fimd_remove,
13271327
.driver = {
13281328
.name = "exynos4-fb",
1329-
.owner = THIS_MODULE,
13301329
.pm = pm_ptr(&exynos_fimd_pm_ops),
13311330
.of_match_table = fimd_driver_dt_match,
13321331
},

drivers/gpu/drm/exynos/exynos_drm_g2d.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,6 @@ struct platform_driver g2d_driver = {
16101610
.remove_new = g2d_remove,
16111611
.driver = {
16121612
.name = "exynos-drm-g2d",
1613-
.owner = THIS_MODULE,
16141613
.pm = pm_ptr(&g2d_pm_ops),
16151614
.of_match_table = exynos_g2d_match,
16161615
},

drivers/gpu/drm/exynos/exynos_drm_gsc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,6 @@ struct platform_driver gsc_driver = {
14231423
.remove_new = gsc_remove,
14241424
.driver = {
14251425
.name = "exynos-drm-gsc",
1426-
.owner = THIS_MODULE,
14271426
.pm = &gsc_pm_ops,
14281427
.of_match_table = exynos_drm_gsc_of_match,
14291428
},

drivers/gpu/drm/exynos/exynos_drm_mic.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,6 @@ struct platform_driver mic_driver = {
464464
.driver = {
465465
.name = "exynos-mic",
466466
.pm = pm_ptr(&exynos_mic_pm_ops),
467-
.owner = THIS_MODULE,
468467
.of_match_table = exynos_mic_of_match,
469468
},
470469
};

drivers/gpu/drm/exynos/exynos_drm_rotator.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,6 @@ struct platform_driver rotator_driver = {
454454
.remove_new = rotator_remove,
455455
.driver = {
456456
.name = "exynos-rotator",
457-
.owner = THIS_MODULE,
458457
.pm = pm_ptr(&rotator_pm_ops),
459458
.of_match_table = exynos_rotator_match,
460459
},

drivers/gpu/drm/exynos/exynos_drm_scaler.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,6 @@ struct platform_driver scaler_driver = {
722722
.remove_new = scaler_remove,
723723
.driver = {
724724
.name = "exynos-scaler",
725-
.owner = THIS_MODULE,
726725
.pm = pm_ptr(&scaler_pm_ops),
727726
.of_match_table = exynos_scaler_match,
728727
},

drivers/gpu/drm/exynos/exynos_drm_vidi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,6 @@ struct platform_driver vidi_driver = {
479479
.remove_new = vidi_remove,
480480
.driver = {
481481
.name = "exynos-drm-vidi",
482-
.owner = THIS_MODULE,
483482
.dev_groups = vidi_groups,
484483
},
485484
};

drivers/gpu/drm/exynos/exynos_hdmi.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,10 +1919,9 @@ static int hdmi_get_ddc_adapter(struct hdmi_context *hdata)
19191919
static int hdmi_get_phy_io(struct hdmi_context *hdata)
19201920
{
19211921
const char *compatible_str = "samsung,exynos4212-hdmiphy";
1922-
struct device_node *np;
1923-
int ret = 0;
1922+
struct device_node *np __free(device_node) =
1923+
of_find_compatible_node(NULL, NULL, compatible_str);
19241924

1925-
np = of_find_compatible_node(NULL, NULL, compatible_str);
19261925
if (!np) {
19271926
np = of_parse_phandle(hdata->dev->of_node, "phy", 0);
19281927
if (!np) {
@@ -1937,21 +1936,17 @@ static int hdmi_get_phy_io(struct hdmi_context *hdata)
19371936
if (!hdata->regs_hdmiphy) {
19381937
DRM_DEV_ERROR(hdata->dev,
19391938
"failed to ioremap hdmi phy\n");
1940-
ret = -ENOMEM;
1941-
goto out;
1939+
return -ENOMEM;
19421940
}
19431941
} else {
19441942
hdata->hdmiphy_port = of_find_i2c_device_by_node(np);
19451943
if (!hdata->hdmiphy_port) {
19461944
DRM_INFO("Failed to get hdmi phy i2c client\n");
1947-
ret = -EPROBE_DEFER;
1948-
goto out;
1945+
return -EPROBE_DEFER;
19491946
}
19501947
}
19511948

1952-
out:
1953-
of_node_put(np);
1954-
return ret;
1949+
return 0;
19551950
}
19561951

19571952
static int hdmi_probe(struct platform_device *pdev)
@@ -2126,7 +2121,6 @@ struct platform_driver hdmi_driver = {
21262121
.remove_new = hdmi_remove,
21272122
.driver = {
21282123
.name = "exynos-hdmi",
2129-
.owner = THIS_MODULE,
21302124
.pm = &exynos_hdmi_pm_ops,
21312125
.of_match_table = hdmi_match_types,
21322126
},

0 commit comments

Comments
 (0)