drm/exynos: fixes for minor cleanup
Subsystems (4)
cover drm/exynos: fixes for minor cleanup
This patches fix Exynos DRM for minor cleanup. This series is based on exynos-drm-next-todo branch of Inki Dae's tree. [1]
[1] git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git
Jingoo Han (6):
drm/exynos: dpi: make local symbol static
drm/exynos: fb: make local symbol static
drm/exynos: hdmi: make local symbols static
drm/exynos: dp: remove unnecessary OOM messages drm/exynos: dsi: use IS_ERR() to check devm_ioremap_resource() results drm/exynos: rotator: add missing braces
--- drivers/gpu/drm/exynos/exynos_dp_core.c | 8 ++------ drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 3 ++- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 ++-- 6 files changed, 10 insertions(+), 13 deletions(-)
PATCH 1/6 drm/exynos: dpi: make local symbol static
Make local symbol static, because this is used only in this file.
--- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_dpi.c +1 -1
@@ -242,7 +242,7 @@ enum { FIMD_PORT_WRB, }; -struct device_node *exynos_dpi_of_find_panel_node (struct device *dev) +static struct device_node *exynos_dpi_of_find_panel_node (struct device *dev) {struct device_node *np, *ep;
Signature · 1 line
1.7.10.4
PATCH 2/6 drm/exynos: fb: make local symbol static
In reply to Jingoo HanMake local symbole static, because this is used only in this file.
--- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_fbdev.c +1 -1
@@ -237,7 +237,7 @@ static struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = { .fb_probe = exynos_drm_fbdev_create, }; -bool exynos_drm_fbdev_is_anything_connected (struct drm_device *dev) +static bool exynos_drm_fbdev_is_anything_connected (struct drm_device *dev) {struct drm_connector *connector;bool ret = false;
Signature · 1 line
1.7.10.4
PATCH 3/6 drm/exynos: hdmi: make local symbols static
In reply to Jingoo HanMake local symbols static, because these are used only in this file.
--- drivers/gpu/drm/exynos/exynos_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_hdmi.c +2 -2
@@ -206,11 +206,11 @@ struct hdmiphy_config {u8 conf[32 ]; }; -struct hdmi_driver_data exynos4212_hdmi_driver_data = { +static struct hdmi_driver_data exynos4212_hdmi_driver_data = { .type =HDMI_TYPE14 , }; -struct hdmi_driver_data exynos5_hdmi_driver_data = { +static struct hdmi_driver_data exynos5_hdmi_driver_data = { .type =HDMI_TYPE14 , };
Signature · 1 line
1.7.10.4
PATCH 4/6 drm/exynos: dp: remove unnecessary OOM messages
In reply to Jingoo HanThe site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message.
--- drivers/gpu/drm/exynos/exynos_dp_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/exynos/exynos_dp_core.c +2 -6
@@ -1113,10 +1113,8 @@ static struct video_info *exynos_dp_dt_parse_pdata(struct device *dev) dp_video_config =devm_kzalloc (dev,sizeof (*dp_video_config),GFP_KERNEL ); -if (!dp_video_config) { -dev_err (dev,"memory allocation for video config failed\n" ); +if (!dp_video_config)return ERR_PTR (-ENOMEM ); - } dp_video_config->h_sync_polarity =of_property_read_bool (dp_node,"hsync-active-high" );
@@ -1231,10 +1229,8 @@ static int exynos_dp_bind(struct device *dev, struct device *master, void *data) dp =devm_kzalloc (&pdev->dev,sizeof (struct exynos_dp_device ),GFP_KERNEL ); -if (!dp) { -dev_err (&pdev->dev,"no memory for device data\n" ); +if (!dp)return -ENOMEM ; - } dp->dev = &pdev->dev; dp->dpms_mode =DRM_MODE_DPMS_OFF ;
Signature · 1 line
1.7.10.4
PATCH 5/6 drm/exynos: dsi: use IS_ERR() to check devm_ioremap_resource() results
In reply to Jingoo Handevm_ioremap_resource() retunrs an error pointer, not NULL. Thus, the result should be checked with IS_ERR().
--- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_dsi.c +2 -2
@@ -1465,9 +1465,9 @@ static int exynos_dsi_probe(struct platform_device *pdev) res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); dsi->reg_base =devm_ioremap_resource (&pdev->dev, res); -if (!dsi->reg_base) { +if (IS_ERR (dsi->reg_base)) {dev_err (&pdev->dev,"failed to remap io region\n" ); -return -EADDRNOTAVAIL ; +return PTR_ERR (dsi->reg_base); } dsi->phy =devm_phy_get (&pdev->dev,"dsim" );
Signature · 1 line
1.7.10.4
PATCH 6/6 drm/exynos: rotator: add missing braces
In reply to Jingoo HanIn the case of that only one branch of a conditional statement is a single statement, braces are added to both branches.
--- drivers/gpu/drm/exynos/exynos_drm_rotator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_rotator.c +2 -1
@@ -158,8 +158,9 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg) rot->cur_buf_id[EXYNOS_DRM_OPS_DST ];queue_work (ippdrv->event_workq, (struct work_struct *)event_work); - }else + }else {DRM_ERROR ("the SFR is set illegally\n" ); + }return IRQ_HANDLED ; }
Signature · 1 line
1.7.10.4