diff options
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 6652597586a1..fd1426dca882 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c | |||
@@ -1946,14 +1946,14 @@ static int hdmi_probe(struct platform_device *pdev) | |||
1946 | 1946 | ||
1947 | DRM_DEBUG_KMS("[%d]\n", __LINE__); | 1947 | DRM_DEBUG_KMS("[%d]\n", __LINE__); |
1948 | 1948 | ||
1949 | if (pdev->dev.of_node) { | 1949 | if (dev->of_node) { |
1950 | pdata = drm_hdmi_dt_parse_pdata(dev); | 1950 | pdata = drm_hdmi_dt_parse_pdata(dev); |
1951 | if (IS_ERR(pdata)) { | 1951 | if (IS_ERR(pdata)) { |
1952 | DRM_ERROR("failed to parse dt\n"); | 1952 | DRM_ERROR("failed to parse dt\n"); |
1953 | return PTR_ERR(pdata); | 1953 | return PTR_ERR(pdata); |
1954 | } | 1954 | } |
1955 | } else { | 1955 | } else { |
1956 | pdata = pdev->dev.platform_data; | 1956 | pdata = dev->platform_data; |
1957 | } | 1957 | } |
1958 | 1958 | ||
1959 | if (!pdata) { | 1959 | if (!pdata) { |
@@ -1961,14 +1961,14 @@ static int hdmi_probe(struct platform_device *pdev) | |||
1961 | return -EINVAL; | 1961 | return -EINVAL; |
1962 | } | 1962 | } |
1963 | 1963 | ||
1964 | drm_hdmi_ctx = devm_kzalloc(&pdev->dev, sizeof(*drm_hdmi_ctx), | 1964 | drm_hdmi_ctx = devm_kzalloc(dev, sizeof(*drm_hdmi_ctx), |
1965 | GFP_KERNEL); | 1965 | GFP_KERNEL); |
1966 | if (!drm_hdmi_ctx) { | 1966 | if (!drm_hdmi_ctx) { |
1967 | DRM_ERROR("failed to allocate common hdmi context.\n"); | 1967 | DRM_ERROR("failed to allocate common hdmi context.\n"); |
1968 | return -ENOMEM; | 1968 | return -ENOMEM; |
1969 | } | 1969 | } |
1970 | 1970 | ||
1971 | hdata = devm_kzalloc(&pdev->dev, sizeof(struct hdmi_context), | 1971 | hdata = devm_kzalloc(dev, sizeof(struct hdmi_context), |
1972 | GFP_KERNEL); | 1972 | GFP_KERNEL); |
1973 | if (!hdata) { | 1973 | if (!hdata) { |
1974 | DRM_ERROR("out of memory\n"); | 1974 | DRM_ERROR("out of memory\n"); |
@@ -1985,7 +1985,7 @@ static int hdmi_probe(struct platform_device *pdev) | |||
1985 | if (dev->of_node) { | 1985 | if (dev->of_node) { |
1986 | const struct of_device_id *match; | 1986 | const struct of_device_id *match; |
1987 | match = of_match_node(of_match_ptr(hdmi_match_types), | 1987 | match = of_match_node(of_match_ptr(hdmi_match_types), |
1988 | pdev->dev.of_node); | 1988 | dev->of_node); |
1989 | if (match == NULL) | 1989 | if (match == NULL) |
1990 | return -ENODEV; | 1990 | return -ENODEV; |
1991 | hdata->type = (enum hdmi_type)match->data; | 1991 | hdata->type = (enum hdmi_type)match->data; |
@@ -2005,11 +2005,11 @@ static int hdmi_probe(struct platform_device *pdev) | |||
2005 | } | 2005 | } |
2006 | 2006 | ||
2007 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 2007 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
2008 | hdata->regs = devm_ioremap_resource(&pdev->dev, res); | 2008 | hdata->regs = devm_ioremap_resource(dev, res); |
2009 | if (IS_ERR(hdata->regs)) | 2009 | if (IS_ERR(hdata->regs)) |
2010 | return PTR_ERR(hdata->regs); | 2010 | return PTR_ERR(hdata->regs); |
2011 | 2011 | ||
2012 | ret = devm_gpio_request(&pdev->dev, hdata->hpd_gpio, "HPD"); | 2012 | ret = devm_gpio_request(dev, hdata->hpd_gpio, "HPD"); |
2013 | if (ret) { | 2013 | if (ret) { |
2014 | DRM_ERROR("failed to request HPD gpio\n"); | 2014 | DRM_ERROR("failed to request HPD gpio\n"); |
2015 | return ret; | 2015 | return ret; |
@@ -2041,7 +2041,7 @@ static int hdmi_probe(struct platform_device *pdev) | |||
2041 | 2041 | ||
2042 | hdata->hpd = gpio_get_value(hdata->hpd_gpio); | 2042 | hdata->hpd = gpio_get_value(hdata->hpd_gpio); |
2043 | 2043 | ||
2044 | ret = request_threaded_irq(hdata->irq, NULL, | 2044 | ret = devm_request_threaded_irq(dev, hdata->irq, NULL, |
2045 | hdmi_irq_thread, IRQF_TRIGGER_RISING | | 2045 | hdmi_irq_thread, IRQF_TRIGGER_RISING | |
2046 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, | 2046 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, |
2047 | "hdmi", drm_hdmi_ctx); | 2047 | "hdmi", drm_hdmi_ctx); |
@@ -2070,16 +2070,11 @@ err_ddc: | |||
2070 | static int hdmi_remove(struct platform_device *pdev) | 2070 | static int hdmi_remove(struct platform_device *pdev) |
2071 | { | 2071 | { |
2072 | struct device *dev = &pdev->dev; | 2072 | struct device *dev = &pdev->dev; |
2073 | struct exynos_drm_hdmi_context *ctx = platform_get_drvdata(pdev); | ||
2074 | struct hdmi_context *hdata = ctx->ctx; | ||
2075 | 2073 | ||
2076 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); | 2074 | DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__); |
2077 | 2075 | ||
2078 | pm_runtime_disable(dev); | 2076 | pm_runtime_disable(dev); |
2079 | 2077 | ||
2080 | free_irq(hdata->irq, hdata); | ||
2081 | |||
2082 | |||
2083 | /* hdmiphy i2c driver */ | 2078 | /* hdmiphy i2c driver */ |
2084 | i2c_del_driver(&hdmiphy_driver); | 2079 | i2c_del_driver(&hdmiphy_driver); |
2085 | /* DDC i2c driver */ | 2080 | /* DDC i2c driver */ |