aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/sti/Kconfig1
-rw-r--r--drivers/gpu/drm/sti/sti_drm_drv.c4
-rw-r--r--drivers/gpu/drm/sti/sti_hda.c10
-rw-r--r--drivers/gpu/drm/sti/sti_hdmi.c10
-rw-r--r--drivers/gpu/drm/sti/sti_tvout.c6
5 files changed, 16 insertions, 15 deletions
diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
index 2d9d4252d598..ae8850f3e63b 100644
--- a/drivers/gpu/drm/sti/Kconfig
+++ b/drivers/gpu/drm/sti/Kconfig
@@ -1,6 +1,7 @@
1config DRM_STI 1config DRM_STI
2 tristate "DRM Support for STMicroelectronics SoC stiH41x Series" 2 tristate "DRM Support for STMicroelectronics SoC stiH41x Series"
3 depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) 3 depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM)
4 select RESET_CONTROLLER
4 select DRM_KMS_HELPER 5 select DRM_KMS_HELPER
5 select DRM_GEM_CMA_HELPER 6 select DRM_GEM_CMA_HELPER
6 select DRM_KMS_CMA_HELPER 7 select DRM_KMS_CMA_HELPER
diff --git a/drivers/gpu/drm/sti/sti_drm_drv.c b/drivers/gpu/drm/sti/sti_drm_drv.c
index a7cc24917a96..223d93c3a05d 100644
--- a/drivers/gpu/drm/sti/sti_drm_drv.c
+++ b/drivers/gpu/drm/sti/sti_drm_drv.c
@@ -201,8 +201,8 @@ static int sti_drm_platform_probe(struct platform_device *pdev)
201 master = platform_device_register_resndata(dev, 201 master = platform_device_register_resndata(dev,
202 DRIVER_NAME "__master", -1, 202 DRIVER_NAME "__master", -1,
203 NULL, 0, NULL, 0); 203 NULL, 0, NULL, 0);
204 if (!master) 204 if (IS_ERR(master))
205 return -EINVAL; 205 return PTR_ERR(master);
206 206
207 platform_set_drvdata(pdev, master); 207 platform_set_drvdata(pdev, master);
208 return 0; 208 return 0;
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
index 72d957f81c05..2ae9a9b73666 100644
--- a/drivers/gpu/drm/sti/sti_hda.c
+++ b/drivers/gpu/drm/sti/sti_hda.c
@@ -730,16 +730,16 @@ static int sti_hda_probe(struct platform_device *pdev)
730 return -ENOMEM; 730 return -ENOMEM;
731 } 731 }
732 hda->regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); 732 hda->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
733 if (IS_ERR(hda->regs)) 733 if (!hda->regs)
734 return PTR_ERR(hda->regs); 734 return -ENOMEM;
735 735
736 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 736 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
737 "video-dacs-ctrl"); 737 "video-dacs-ctrl");
738 if (res) { 738 if (res) {
739 hda->video_dacs_ctrl = devm_ioremap_nocache(dev, res->start, 739 hda->video_dacs_ctrl = devm_ioremap_nocache(dev, res->start,
740 resource_size(res)); 740 resource_size(res));
741 if (IS_ERR(hda->video_dacs_ctrl)) 741 if (!hda->video_dacs_ctrl)
742 return PTR_ERR(hda->video_dacs_ctrl); 742 return -ENOMEM;
743 } else { 743 } else {
744 /* If no existing video-dacs-ctrl resource continue the probe */ 744 /* If no existing video-dacs-ctrl resource continue the probe */
745 DRM_DEBUG_DRIVER("No video-dacs-ctrl resource\n"); 745 DRM_DEBUG_DRIVER("No video-dacs-ctrl resource\n");
@@ -770,7 +770,7 @@ static int sti_hda_remove(struct platform_device *pdev)
770 return 0; 770 return 0;
771} 771}
772 772
773static struct of_device_id hda_of_match[] = { 773static const struct of_device_id hda_of_match[] = {
774 { .compatible = "st,stih416-hda", }, 774 { .compatible = "st,stih416-hda", },
775 { .compatible = "st,stih407-hda", }, 775 { .compatible = "st,stih407-hda", },
776 { /* end node */ } 776 { /* end node */ }
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index 284e541d970d..ef93156a69c6 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -677,7 +677,7 @@ static const struct component_ops sti_hdmi_ops = {
677 .unbind = sti_hdmi_unbind, 677 .unbind = sti_hdmi_unbind,
678}; 678};
679 679
680static struct of_device_id hdmi_of_match[] = { 680static const struct of_device_id hdmi_of_match[] = {
681 { 681 {
682 .compatible = "st,stih416-hdmi", 682 .compatible = "st,stih416-hdmi",
683 .data = &tx3g0c55phy_ops, 683 .data = &tx3g0c55phy_ops,
@@ -713,8 +713,8 @@ static int sti_hdmi_probe(struct platform_device *pdev)
713 return -ENOMEM; 713 return -ENOMEM;
714 } 714 }
715 hdmi->regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); 715 hdmi->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
716 if (IS_ERR(hdmi->regs)) 716 if (!hdmi->regs)
717 return PTR_ERR(hdmi->regs); 717 return -ENOMEM;
718 718
719 if (of_device_is_compatible(np, "st,stih416-hdmi")) { 719 if (of_device_is_compatible(np, "st,stih416-hdmi")) {
720 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, 720 res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
@@ -725,8 +725,8 @@ static int sti_hdmi_probe(struct platform_device *pdev)
725 } 725 }
726 hdmi->syscfg = devm_ioremap_nocache(dev, res->start, 726 hdmi->syscfg = devm_ioremap_nocache(dev, res->start,
727 resource_size(res)); 727 resource_size(res));
728 if (IS_ERR(hdmi->syscfg)) 728 if (!hdmi->syscfg)
729 return PTR_ERR(hdmi->syscfg); 729 return -ENOMEM;
730 730
731 } 731 }
732 732
diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c
index b69e26fee76e..b8afe490356a 100644
--- a/drivers/gpu/drm/sti/sti_tvout.c
+++ b/drivers/gpu/drm/sti/sti_tvout.c
@@ -591,8 +591,8 @@ static int sti_tvout_probe(struct platform_device *pdev)
591 return -ENOMEM; 591 return -ENOMEM;
592 } 592 }
593 tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); 593 tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
594 if (IS_ERR(tvout->regs)) 594 if (!tvout->regs)
595 return PTR_ERR(tvout->regs); 595 return -ENOMEM;
596 596
597 /* get reset resources */ 597 /* get reset resources */
598 tvout->reset = devm_reset_control_get(dev, "tvout"); 598 tvout->reset = devm_reset_control_get(dev, "tvout");
@@ -624,7 +624,7 @@ static int sti_tvout_remove(struct platform_device *pdev)
624 return 0; 624 return 0;
625} 625}
626 626
627static struct of_device_id tvout_of_match[] = { 627static const struct of_device_id tvout_of_match[] = {
628 { .compatible = "st,stih416-tvout", }, 628 { .compatible = "st,stih416-tvout", },
629 { .compatible = "st,stih407-tvout", }, 629 { .compatible = "st,stih407-tvout", },
630 { /* end node */ } 630 { /* end node */ }