summaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_hdmi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 14:44:20 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 14:44:20 +0900
commitf0d55cc1a65852e6647d4f5d707c1c9b5471ce3c (patch)
treee96d6a88590f656d86c1f58cb0b34d40d6091b63 /drivers/video/sh_mobile_hdmi.c
parent549608eadb31eac5d579ed70a21ac722bdf72861 (diff)
parent3a41c5dbe8bc396a7fb16ca8739e945bb003342e (diff)
downloadtalos-op-linux-f0d55cc1a65852e6647d4f5d707c1c9b5471ce3c.tar.gz
talos-op-linux-f0d55cc1a65852e6647d4f5d707c1c9b5471ce3c.zip
Merge tag 'fbdev-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev changes from Tomi Valkeinen: "Nothing particularly stands out in this pull request. The biggest part of the changes are cleanups. Maybe one fix to mention is the "fb: reorder the lock sequence to fix potential dead lock" which hopefully fixes the fb locking issues reported by multiple persons. There are also a few commits that have changes to arch/arm/mach-at91 and arch/avr32, which have been acked by the maintainers" * tag 'fbdev-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (143 commits) fb: reorder the lock sequence to fix potential dead lock fbdev: shmobile-lcdcfb: Convert to clk_prepare/unprepare fbdev: shmobile-hdmi: Convert to clk_prepare/unprepare omapdss: Add new panel driver for Topolly td028ttec1 LCD. video: exynos_mipi_dsi: Unlock the mutex before returning video: da8xx-fb: remove unwanted define video: Remove unnecessary semicolons simplefb: use write-combined remapping simplefb: fix unmapping fb during destruction OMAPDSS: connector-dvi: fix releasing i2c_adapter OMAPDSS: DSI: fix perf measuring ifdefs framebuffer: Use fb_<level> framebuffer: Add fb_<level> convenience logging macros efifb: prevent null-deref when iterating dmi_list fbdev: fix error return code in metronomefb_probe() video: xilinxfb: Fix for "Use standard variable name convention" OMAPDSS: Fix de_level in videomode_to_omap_video_timings() video: xilinxfb: Simplify error path video: xilinxfb: Use devm_kzalloc instead of kzalloc video: xilinxfb: Use standard variable name convention ...
Diffstat (limited to 'drivers/video/sh_mobile_hdmi.c')
-rw-r--r--drivers/video/sh_mobile_hdmi.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index bfe4728480fd..9a33ee0413fb 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -498,7 +498,7 @@ static void sh_hdmi_video_config(struct sh_hdmi *hdmi)
static void sh_hdmi_audio_config(struct sh_hdmi *hdmi)
{
u8 data;
- struct sh_mobile_hdmi_info *pdata = hdmi->dev->platform_data;
+ struct sh_mobile_hdmi_info *pdata = dev_get_platdata(hdmi->dev);
/*
* [7:4] L/R data swap control
@@ -815,7 +815,7 @@ static unsigned long sh_hdmi_rate_error(struct sh_hdmi *hdmi,
unsigned long *hdmi_rate, unsigned long *parent_rate)
{
unsigned long target = PICOS2KHZ(mode->pixclock) * 1000, rate_error;
- struct sh_mobile_hdmi_info *pdata = hdmi->dev->platform_data;
+ struct sh_mobile_hdmi_info *pdata = dev_get_platdata(hdmi->dev);
*hdmi_rate = clk_round_rate(hdmi->hdmi_clk, target);
if ((long)*hdmi_rate < 0)
@@ -1271,7 +1271,7 @@ static void sh_hdmi_htop1_init(struct sh_hdmi *hdmi)
static int __init sh_hdmi_probe(struct platform_device *pdev)
{
- struct sh_mobile_hdmi_info *pdata = pdev->dev.platform_data;
+ struct sh_mobile_hdmi_info *pdata = dev_get_platdata(&pdev->dev);
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
struct resource *htop1_res;
int irq = platform_get_irq(pdev, 0), ret;
@@ -1290,7 +1290,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
}
}
- hdmi = kzalloc(sizeof(*hdmi), GFP_KERNEL);
+ hdmi = devm_kzalloc(&pdev->dev, sizeof(*hdmi), GFP_KERNEL);
if (!hdmi) {
dev_err(&pdev->dev, "Cannot allocate device data\n");
return -ENOMEM;
@@ -1304,7 +1304,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
if (IS_ERR(hdmi->hdmi_clk)) {
ret = PTR_ERR(hdmi->hdmi_clk);
dev_err(&pdev->dev, "Unable to get clock: %d\n", ret);
- goto egetclk;
+ return ret;
}
/* select register access functions */
@@ -1326,7 +1326,7 @@ static int __init sh_hdmi_probe(struct platform_device *pdev)
goto erate;
}
- ret = clk_enable(hdmi->hdmi_clk);
+ ret = clk_prepare_enable(hdmi->hdmi_clk);
if (ret < 0) {
dev_err(hdmi->dev, "Cannot enable clock: %d\n", ret);
goto erate;
@@ -1404,11 +1404,9 @@ emap_htop1:
emap:
release_mem_region(res->start, resource_size(res));
ereqreg:
- clk_disable(hdmi->hdmi_clk);
+ clk_disable_unprepare(hdmi->hdmi_clk);
erate:
clk_put(hdmi->hdmi_clk);
-egetclk:
- kfree(hdmi);
return ret;
}
@@ -1427,13 +1425,12 @@ static int __exit sh_hdmi_remove(struct platform_device *pdev)
cancel_delayed_work_sync(&hdmi->edid_work);
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- clk_disable(hdmi->hdmi_clk);
+ clk_disable_unprepare(hdmi->hdmi_clk);
clk_put(hdmi->hdmi_clk);
if (hdmi->htop1)
iounmap(hdmi->htop1);
iounmap(hdmi->base);
release_mem_region(res->start, resource_size(res));
- kfree(hdmi);
return 0;
}
OpenPOWER on IntegriCloud