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 -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEoxi+6c5pRPV/gdXcxWAb7Og/+bYFAmYptDkACgkQxWAb7Og/ +bZl4gwAlYq5mvV0ywcMEqpZL+X0aJ6p2wUaBfYLlMGegEPf/q+jR/KDUipJfTfr YbP3JyT5XaY/ZDRzhLsajwziY8/i7FPdiwYmIqAt7gLu2Oblya8BbuTzCW6dZ6Fs cx1/xm0yrV8OPDWea2/XBVvu9Z0tPj7BJvMBtpjqm/ee/SRp5XwLnhe4m+lwJrhk PZyGkItFaoXwFx+pY6vIv+CUAvJQotKfab56asf4NDhvHyrD5TdV1IwMyyuyUiNp 9bCgiJVXRVGBwR/Hr70lJZNbrP/MauafmWvwC8H+H+J+WYgNT1Y+0jbNNYtUyd7F kYKjuF3qIMnF8VnCNKaPX8iMnye+gHb85diEL1FF28HUUTh1pwps6Wvto+nlc7SF HmOBOZDZm6tzVyjLJFxUgbO9d7/2EHUu6Fr4WI+SJtD5eKdMHMDYLvOr1pX+Az/z jUIG3L30OTWop1/VJS7A6oJXJOe28wuW6mjJveBNk5a145Nhr992vJmAWsWRJsTB aKqeBNo4 =k39J -----END PGP SIGNATURE----- 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 <airlied@redhat.com> From: Inki Dae <inki.dae@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240425034325.33507-1-inki.dae@samsung.com
This commit is contained in:
commit
bbecb57e28
@ -184,7 +184,6 @@ struct platform_driver dsi_driver = {
|
||||
.remove_new = samsung_dsim_remove,
|
||||
.driver = {
|
||||
.name = "exynos-dsi",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &samsung_dsim_pm_ops,
|
||||
.of_match_table = exynos_dsi_of_match,
|
||||
},
|
||||
|
@ -1412,7 +1412,6 @@ struct platform_driver fimc_driver = {
|
||||
.driver = {
|
||||
.of_match_table = fimc_of_match,
|
||||
.name = "exynos-drm-fimc",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = pm_ptr(&fimc_pm_ops),
|
||||
},
|
||||
};
|
||||
|
@ -1326,7 +1326,6 @@ struct platform_driver fimd_driver = {
|
||||
.remove_new = fimd_remove,
|
||||
.driver = {
|
||||
.name = "exynos4-fb",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = pm_ptr(&exynos_fimd_pm_ops),
|
||||
.of_match_table = fimd_driver_dt_match,
|
||||
},
|
||||
|
@ -1610,7 +1610,6 @@ struct platform_driver g2d_driver = {
|
||||
.remove_new = g2d_remove,
|
||||
.driver = {
|
||||
.name = "exynos-drm-g2d",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = pm_ptr(&g2d_pm_ops),
|
||||
.of_match_table = exynos_g2d_match,
|
||||
},
|
||||
|
@ -1423,7 +1423,6 @@ struct platform_driver gsc_driver = {
|
||||
.remove_new = gsc_remove,
|
||||
.driver = {
|
||||
.name = "exynos-drm-gsc",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &gsc_pm_ops,
|
||||
.of_match_table = exynos_drm_gsc_of_match,
|
||||
},
|
||||
|
@ -464,7 +464,6 @@ struct platform_driver mic_driver = {
|
||||
.driver = {
|
||||
.name = "exynos-mic",
|
||||
.pm = pm_ptr(&exynos_mic_pm_ops),
|
||||
.owner = THIS_MODULE,
|
||||
.of_match_table = exynos_mic_of_match,
|
||||
},
|
||||
};
|
||||
|
@ -454,7 +454,6 @@ struct platform_driver rotator_driver = {
|
||||
.remove_new = rotator_remove,
|
||||
.driver = {
|
||||
.name = "exynos-rotator",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = pm_ptr(&rotator_pm_ops),
|
||||
.of_match_table = exynos_rotator_match,
|
||||
},
|
||||
|
@ -722,7 +722,6 @@ struct platform_driver scaler_driver = {
|
||||
.remove_new = scaler_remove,
|
||||
.driver = {
|
||||
.name = "exynos-scaler",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = pm_ptr(&scaler_pm_ops),
|
||||
.of_match_table = exynos_scaler_match,
|
||||
},
|
||||
|
@ -479,7 +479,6 @@ struct platform_driver vidi_driver = {
|
||||
.remove_new = vidi_remove,
|
||||
.driver = {
|
||||
.name = "exynos-drm-vidi",
|
||||
.owner = THIS_MODULE,
|
||||
.dev_groups = vidi_groups,
|
||||
},
|
||||
};
|
||||
|
@ -1919,10 +1919,9 @@ static int hdmi_get_ddc_adapter(struct hdmi_context *hdata)
|
||||
static int hdmi_get_phy_io(struct hdmi_context *hdata)
|
||||
{
|
||||
const char *compatible_str = "samsung,exynos4212-hdmiphy";
|
||||
struct device_node *np;
|
||||
int ret = 0;
|
||||
struct device_node *np __free(device_node) =
|
||||
of_find_compatible_node(NULL, NULL, compatible_str);
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, compatible_str);
|
||||
if (!np) {
|
||||
np = of_parse_phandle(hdata->dev->of_node, "phy", 0);
|
||||
if (!np) {
|
||||
@ -1937,21 +1936,17 @@ static int hdmi_get_phy_io(struct hdmi_context *hdata)
|
||||
if (!hdata->regs_hdmiphy) {
|
||||
DRM_DEV_ERROR(hdata->dev,
|
||||
"failed to ioremap hdmi phy\n");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
return -ENOMEM;
|
||||
}
|
||||
} else {
|
||||
hdata->hdmiphy_port = of_find_i2c_device_by_node(np);
|
||||
if (!hdata->hdmiphy_port) {
|
||||
DRM_INFO("Failed to get hdmi phy i2c client\n");
|
||||
ret = -EPROBE_DEFER;
|
||||
goto out;
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
of_node_put(np);
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hdmi_probe(struct platform_device *pdev)
|
||||
@ -2126,7 +2121,6 @@ struct platform_driver hdmi_driver = {
|
||||
.remove_new = hdmi_remove,
|
||||
.driver = {
|
||||
.name = "exynos-hdmi",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &exynos_hdmi_pm_ops,
|
||||
.of_match_table = hdmi_match_types,
|
||||
},
|
||||
|
@ -1331,7 +1331,6 @@ static const struct dev_pm_ops exynos_mixer_pm_ops = {
|
||||
struct platform_driver mixer_driver = {
|
||||
.driver = {
|
||||
.name = "exynos-mixer",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &exynos_mixer_pm_ops,
|
||||
.of_match_table = mixer_match_types,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user