aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-tv
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 20:35:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-24 20:35:10 -0500
commit21fbd5809ad126b949206d78e0a0e07ec872ea11 (patch)
treea824045df99fc1f0690095a925cceb50207e332b /drivers/media/platform/s5p-tv
parentd9978ec5680059d727b39d6c706777c6973587f2 (diff)
parented72d37a33fdf43dc47787fe220532cdec9da528 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - Some cleanups at V4L2 documentation - new drivers: ts2020 frontend, ov9650 sensor, s5c73m3 sensor, sh-mobile veu mem2mem driver, radio-ma901, davinci_vpfe staging driver - Lots of missing MAINTAINERS entries added - several em28xx driver improvements, including its conversion to videobuf2 - several fixups on drivers to make them to better comply with the API - DVB core: add support for DVBv5 stats, allowing the implementation of statistics for new standards like ISDB - mb86a20s: add statistics to the driver - lots of new board additions, cleanups, and driver improvements. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (596 commits) [media] media: Add 0x3009 USB PID to ttusb2 driver (fixed diff) [media] rtl28xxu: Add USB IDs for Compro VideoMate U620F [media] em28xx: add usb id for terratec h5 rev. 3 [media] media: rc: gpio-ir-recv: add support for device tree parsing [media] mceusb: move check earlier to make smatch happy [media] radio-si470x doc: add info about v4l2-ctl and sox+alsa [media] staging: media: Remove unnecessary OOM messages [media] sh_vou: Use vou_dev instead of vou_file wherever possible [media] sh_vou: Use video_drvdata() [media] drivers/media/platform/soc_camera/pxa_camera.c: use devm_ functions [media] mt9t112: mt9t111 format set up differs from mt9t112 [media] sh-mobile-ceu-camera: fix SHARPNESS control default Revert "[media] fc0011: Return early, if the frequency is already tuned" [media] cx18/ivtv: fix regression: remove __init from a non-init function [media] em28xx: fix analog streaming with USB bulk transfers [media] stv0900: remove unnecessary null pointer check [media] fc0011: Return early, if the frequency is already tuned [media] fc0011: Add some sanity checks and cleanups [media] fc0011: Fix xin value clamping Revert "[media] [PATH,1/2] mxl5007 move reset to attach" ...
Diffstat (limited to 'drivers/media/platform/s5p-tv')
-rw-r--r--drivers/media/platform/s5p-tv/hdmi_drv.c18
-rw-r--r--drivers/media/platform/s5p-tv/hdmiphy_drv.c2
-rw-r--r--drivers/media/platform/s5p-tv/mixer.h1
-rw-r--r--drivers/media/platform/s5p-tv/mixer_drv.c14
-rw-r--r--drivers/media/platform/s5p-tv/mixer_reg.c6
-rw-r--r--drivers/media/platform/s5p-tv/mixer_video.c19
-rw-r--r--drivers/media/platform/s5p-tv/sdo_drv.c29
-rw-r--r--drivers/media/platform/s5p-tv/sii9234_drv.c6
8 files changed, 48 insertions, 47 deletions
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c
index 7c1116c73bf3..8de1b3dce459 100644
--- a/drivers/media/platform/s5p-tv/hdmi_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmi_drv.c
@@ -656,7 +656,7 @@ static int hdmi_g_mbus_fmt(struct v4l2_subdev *sd,
656 dev_dbg(hdev->dev, "%s\n", __func__); 656 dev_dbg(hdev->dev, "%s\n", __func__);
657 if (!hdev->cur_conf) 657 if (!hdev->cur_conf)
658 return -EINVAL; 658 return -EINVAL;
659 memset(fmt, 0, sizeof *fmt); 659 memset(fmt, 0, sizeof(*fmt));
660 fmt->width = t->hact.end - t->hact.beg; 660 fmt->width = t->hact.end - t->hact.beg;
661 fmt->height = t->vact[0].end - t->vact[0].beg; 661 fmt->height = t->vact[0].end - t->vact[0].beg;
662 fmt->code = V4L2_MBUS_FMT_FIXED; /* means RGB888 */ 662 fmt->code = V4L2_MBUS_FMT_FIXED; /* means RGB888 */
@@ -760,7 +760,7 @@ static void hdmi_resources_cleanup(struct hdmi_device *hdev)
760 clk_put(res->sclk_hdmi); 760 clk_put(res->sclk_hdmi);
761 if (!IS_ERR_OR_NULL(res->hdmi)) 761 if (!IS_ERR_OR_NULL(res->hdmi))
762 clk_put(res->hdmi); 762 clk_put(res->hdmi);
763 memset(res, 0, sizeof *res); 763 memset(res, 0, sizeof(*res));
764} 764}
765 765
766static int hdmi_resources_init(struct hdmi_device *hdev) 766static int hdmi_resources_init(struct hdmi_device *hdev)
@@ -777,31 +777,31 @@ static int hdmi_resources_init(struct hdmi_device *hdev)
777 777
778 dev_dbg(dev, "HDMI resource init\n"); 778 dev_dbg(dev, "HDMI resource init\n");
779 779
780 memset(res, 0, sizeof *res); 780 memset(res, 0, sizeof(*res));
781 /* get clocks, power */ 781 /* get clocks, power */
782 782
783 res->hdmi = clk_get(dev, "hdmi"); 783 res->hdmi = clk_get(dev, "hdmi");
784 if (IS_ERR_OR_NULL(res->hdmi)) { 784 if (IS_ERR(res->hdmi)) {
785 dev_err(dev, "failed to get clock 'hdmi'\n"); 785 dev_err(dev, "failed to get clock 'hdmi'\n");
786 goto fail; 786 goto fail;
787 } 787 }
788 res->sclk_hdmi = clk_get(dev, "sclk_hdmi"); 788 res->sclk_hdmi = clk_get(dev, "sclk_hdmi");
789 if (IS_ERR_OR_NULL(res->sclk_hdmi)) { 789 if (IS_ERR(res->sclk_hdmi)) {
790 dev_err(dev, "failed to get clock 'sclk_hdmi'\n"); 790 dev_err(dev, "failed to get clock 'sclk_hdmi'\n");
791 goto fail; 791 goto fail;
792 } 792 }
793 res->sclk_pixel = clk_get(dev, "sclk_pixel"); 793 res->sclk_pixel = clk_get(dev, "sclk_pixel");
794 if (IS_ERR_OR_NULL(res->sclk_pixel)) { 794 if (IS_ERR(res->sclk_pixel)) {
795 dev_err(dev, "failed to get clock 'sclk_pixel'\n"); 795 dev_err(dev, "failed to get clock 'sclk_pixel'\n");
796 goto fail; 796 goto fail;
797 } 797 }
798 res->sclk_hdmiphy = clk_get(dev, "sclk_hdmiphy"); 798 res->sclk_hdmiphy = clk_get(dev, "sclk_hdmiphy");
799 if (IS_ERR_OR_NULL(res->sclk_hdmiphy)) { 799 if (IS_ERR(res->sclk_hdmiphy)) {
800 dev_err(dev, "failed to get clock 'sclk_hdmiphy'\n"); 800 dev_err(dev, "failed to get clock 'sclk_hdmiphy'\n");
801 goto fail; 801 goto fail;
802 } 802 }
803 res->hdmiphy = clk_get(dev, "hdmiphy"); 803 res->hdmiphy = clk_get(dev, "hdmiphy");
804 if (IS_ERR_OR_NULL(res->hdmiphy)) { 804 if (IS_ERR(res->hdmiphy)) {
805 dev_err(dev, "failed to get clock 'hdmiphy'\n"); 805 dev_err(dev, "failed to get clock 'hdmiphy'\n");
806 goto fail; 806 goto fail;
807 } 807 }
@@ -955,7 +955,7 @@ static int hdmi_probe(struct platform_device *pdev)
955 v4l2_subdev_init(sd, &hdmi_sd_ops); 955 v4l2_subdev_init(sd, &hdmi_sd_ops);
956 sd->owner = THIS_MODULE; 956 sd->owner = THIS_MODULE;
957 957
958 strlcpy(sd->name, "s5p-hdmi", sizeof sd->name); 958 strlcpy(sd->name, "s5p-hdmi", sizeof(sd->name));
959 hdmi_dev->cur_preset = HDMI_DEFAULT_PRESET; 959 hdmi_dev->cur_preset = HDMI_DEFAULT_PRESET;
960 /* FIXME: missing fail preset is not supported */ 960 /* FIXME: missing fail preset is not supported */
961 hdmi_dev->cur_conf = hdmi_preset2timings(hdmi_dev->cur_preset); 961 hdmi_dev->cur_conf = hdmi_preset2timings(hdmi_dev->cur_preset);
diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
index 06b5d2dbb2d9..80717cec76ae 100644
--- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
@@ -284,7 +284,7 @@ static int hdmiphy_probe(struct i2c_client *client,
284{ 284{
285 struct hdmiphy_ctx *ctx; 285 struct hdmiphy_ctx *ctx;
286 286
287 ctx = kzalloc(sizeof *ctx, GFP_KERNEL); 287 ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
288 if (!ctx) 288 if (!ctx)
289 return -ENOMEM; 289 return -ENOMEM;
290 290
diff --git a/drivers/media/platform/s5p-tv/mixer.h b/drivers/media/platform/s5p-tv/mixer.h
index b671e20e9318..04e6490a45be 100644
--- a/drivers/media/platform/s5p-tv/mixer.h
+++ b/drivers/media/platform/s5p-tv/mixer.h
@@ -19,6 +19,7 @@
19#endif 19#endif
20 20
21#include <linux/fb.h> 21#include <linux/fb.h>
22#include <linux/irqreturn.h>
22#include <linux/kernel.h> 23#include <linux/kernel.h>
23#include <linux/spinlock.h> 24#include <linux/spinlock.h>
24#include <linux/wait.h> 25#include <linux/wait.h>
diff --git a/drivers/media/platform/s5p-tv/mixer_drv.c b/drivers/media/platform/s5p-tv/mixer_drv.c
index 02faea03aa7d..5733033a6ead 100644
--- a/drivers/media/platform/s5p-tv/mixer_drv.c
+++ b/drivers/media/platform/s5p-tv/mixer_drv.c
@@ -240,27 +240,27 @@ static int mxr_acquire_clocks(struct mxr_device *mdev)
240 struct device *dev = mdev->dev; 240 struct device *dev = mdev->dev;
241 241
242 res->mixer = clk_get(dev, "mixer"); 242 res->mixer = clk_get(dev, "mixer");
243 if (IS_ERR_OR_NULL(res->mixer)) { 243 if (IS_ERR(res->mixer)) {
244 mxr_err(mdev, "failed to get clock 'mixer'\n"); 244 mxr_err(mdev, "failed to get clock 'mixer'\n");
245 goto fail; 245 goto fail;
246 } 246 }
247 res->vp = clk_get(dev, "vp"); 247 res->vp = clk_get(dev, "vp");
248 if (IS_ERR_OR_NULL(res->vp)) { 248 if (IS_ERR(res->vp)) {
249 mxr_err(mdev, "failed to get clock 'vp'\n"); 249 mxr_err(mdev, "failed to get clock 'vp'\n");
250 goto fail; 250 goto fail;
251 } 251 }
252 res->sclk_mixer = clk_get(dev, "sclk_mixer"); 252 res->sclk_mixer = clk_get(dev, "sclk_mixer");
253 if (IS_ERR_OR_NULL(res->sclk_mixer)) { 253 if (IS_ERR(res->sclk_mixer)) {
254 mxr_err(mdev, "failed to get clock 'sclk_mixer'\n"); 254 mxr_err(mdev, "failed to get clock 'sclk_mixer'\n");
255 goto fail; 255 goto fail;
256 } 256 }
257 res->sclk_hdmi = clk_get(dev, "sclk_hdmi"); 257 res->sclk_hdmi = clk_get(dev, "sclk_hdmi");
258 if (IS_ERR_OR_NULL(res->sclk_hdmi)) { 258 if (IS_ERR(res->sclk_hdmi)) {
259 mxr_err(mdev, "failed to get clock 'sclk_hdmi'\n"); 259 mxr_err(mdev, "failed to get clock 'sclk_hdmi'\n");
260 goto fail; 260 goto fail;
261 } 261 }
262 res->sclk_dac = clk_get(dev, "sclk_dac"); 262 res->sclk_dac = clk_get(dev, "sclk_dac");
263 if (IS_ERR_OR_NULL(res->sclk_dac)) { 263 if (IS_ERR(res->sclk_dac)) {
264 mxr_err(mdev, "failed to get clock 'sclk_dac'\n"); 264 mxr_err(mdev, "failed to get clock 'sclk_dac'\n");
265 goto fail; 265 goto fail;
266 } 266 }
@@ -298,7 +298,7 @@ static void mxr_release_resources(struct mxr_device *mdev)
298{ 298{
299 mxr_release_clocks(mdev); 299 mxr_release_clocks(mdev);
300 mxr_release_plat_resources(mdev); 300 mxr_release_plat_resources(mdev);
301 memset(&mdev->res, 0, sizeof mdev->res); 301 memset(&mdev->res, 0, sizeof(mdev->res));
302} 302}
303 303
304static void mxr_release_layers(struct mxr_device *mdev) 304static void mxr_release_layers(struct mxr_device *mdev)
@@ -382,7 +382,7 @@ static int mxr_probe(struct platform_device *pdev)
382 /* mdev does not exist yet so no mxr_dbg is used */ 382 /* mdev does not exist yet so no mxr_dbg is used */
383 dev_info(dev, "probe start\n"); 383 dev_info(dev, "probe start\n");
384 384
385 mdev = kzalloc(sizeof *mdev, GFP_KERNEL); 385 mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
386 if (!mdev) { 386 if (!mdev) {
387 dev_err(dev, "not enough memory.\n"); 387 dev_err(dev, "not enough memory.\n");
388 ret = -ENOMEM; 388 ret = -ENOMEM;
diff --git a/drivers/media/platform/s5p-tv/mixer_reg.c b/drivers/media/platform/s5p-tv/mixer_reg.c
index 3b1670a045f4..b713403024ef 100644
--- a/drivers/media/platform/s5p-tv/mixer_reg.c
+++ b/drivers/media/platform/s5p-tv/mixer_reg.c
@@ -470,11 +470,11 @@ static inline void mxr_reg_vp_filter_set(struct mxr_device *mdev,
470static void mxr_reg_vp_default_filter(struct mxr_device *mdev) 470static void mxr_reg_vp_default_filter(struct mxr_device *mdev)
471{ 471{
472 mxr_reg_vp_filter_set(mdev, VP_POLY8_Y0_LL, 472 mxr_reg_vp_filter_set(mdev, VP_POLY8_Y0_LL,
473 filter_y_horiz_tap8, sizeof filter_y_horiz_tap8); 473 filter_y_horiz_tap8, sizeof(filter_y_horiz_tap8));
474 mxr_reg_vp_filter_set(mdev, VP_POLY4_Y0_LL, 474 mxr_reg_vp_filter_set(mdev, VP_POLY4_Y0_LL,
475 filter_y_vert_tap4, sizeof filter_y_vert_tap4); 475 filter_y_vert_tap4, sizeof(filter_y_vert_tap4));
476 mxr_reg_vp_filter_set(mdev, VP_POLY4_C0_LL, 476 mxr_reg_vp_filter_set(mdev, VP_POLY4_C0_LL,
477 filter_cr_horiz_tap4, sizeof filter_cr_horiz_tap4); 477 filter_cr_horiz_tap4, sizeof(filter_cr_horiz_tap4));
478} 478}
479 479
480static void mxr_reg_mxr_dump(struct mxr_device *mdev) 480static void mxr_reg_mxr_dump(struct mxr_device *mdev)
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
index 1f3b7436511c..82142a2d6d93 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -19,6 +19,7 @@
19#include <linux/videodev2.h> 19#include <linux/videodev2.h>
20#include <linux/mm.h> 20#include <linux/mm.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/platform_device.h>
22#include <linux/timer.h> 23#include <linux/timer.h>
23#include <media/videobuf2-dma-contig.h> 24#include <media/videobuf2-dma-contig.h>
24 25
@@ -95,7 +96,7 @@ int mxr_acquire_video(struct mxr_device *mdev,
95 /* trying to register next output */ 96 /* trying to register next output */
96 if (sd == NULL) 97 if (sd == NULL)
97 continue; 98 continue;
98 out = kzalloc(sizeof *out, GFP_KERNEL); 99 out = kzalloc(sizeof(*out), GFP_KERNEL);
99 if (out == NULL) { 100 if (out == NULL) {
100 mxr_err(mdev, "no memory for '%s'\n", 101 mxr_err(mdev, "no memory for '%s'\n",
101 conf->output_name); 102 conf->output_name);
@@ -127,7 +128,7 @@ fail_output:
127 /* kfree is NULL-safe */ 128 /* kfree is NULL-safe */
128 for (i = 0; i < mdev->output_cnt; ++i) 129 for (i = 0; i < mdev->output_cnt; ++i)
129 kfree(mdev->output[i]); 130 kfree(mdev->output[i]);
130 memset(mdev->output, 0, sizeof mdev->output); 131 memset(mdev->output, 0, sizeof(mdev->output));
131 132
132fail_vb2_allocator: 133fail_vb2_allocator:
133 /* freeing allocator context */ 134 /* freeing allocator context */
@@ -160,8 +161,8 @@ static int mxr_querycap(struct file *file, void *priv,
160 161
161 mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__); 162 mxr_dbg(layer->mdev, "%s:%d\n", __func__, __LINE__);
162 163
163 strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof cap->driver); 164 strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof(cap->driver));
164 strlcpy(cap->card, layer->vfd.name, sizeof cap->card); 165 strlcpy(cap->card, layer->vfd.name, sizeof(cap->card));
165 sprintf(cap->bus_info, "%d", layer->idx); 166 sprintf(cap->bus_info, "%d", layer->idx);
166 cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT_MPLANE; 167 cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
167 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; 168 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
@@ -192,7 +193,7 @@ static void mxr_layer_default_geo(struct mxr_layer *layer)
192 struct mxr_device *mdev = layer->mdev; 193 struct mxr_device *mdev = layer->mdev;
193 struct v4l2_mbus_framefmt mbus_fmt; 194 struct v4l2_mbus_framefmt mbus_fmt;
194 195
195 memset(&layer->geo, 0, sizeof layer->geo); 196 memset(&layer->geo, 0, sizeof(layer->geo));
196 197
197 mxr_get_mbus_fmt(mdev, &mbus_fmt); 198 mxr_get_mbus_fmt(mdev, &mbus_fmt);
198 199
@@ -425,7 +426,7 @@ static int mxr_s_selection(struct file *file, void *fh,
425 struct mxr_geometry tmp; 426 struct mxr_geometry tmp;
426 struct v4l2_rect res; 427 struct v4l2_rect res;
427 428
428 memset(&res, 0, sizeof res); 429 memset(&res, 0, sizeof(res));
429 430
430 mxr_dbg(layer->mdev, "%s: rect: %dx%d@%d,%d\n", __func__, 431 mxr_dbg(layer->mdev, "%s: rect: %dx%d@%d,%d\n", __func__,
431 s->r.width, s->r.height, s->r.left, s->r.top); 432 s->r.width, s->r.height, s->r.left, s->r.top);
@@ -464,7 +465,7 @@ static int mxr_s_selection(struct file *file, void *fh,
464 /* apply change and update geometry if needed */ 465 /* apply change and update geometry if needed */
465 if (target) { 466 if (target) {
466 /* backup current geometry if setup fails */ 467 /* backup current geometry if setup fails */
467 memcpy(&tmp, geo, sizeof tmp); 468 memcpy(&tmp, geo, sizeof(tmp));
468 469
469 /* apply requested selection */ 470 /* apply requested selection */
470 target->x_offset = s->r.left; 471 target->x_offset = s->r.left;
@@ -496,7 +497,7 @@ static int mxr_s_selection(struct file *file, void *fh,
496fail: 497fail:
497 /* restore old geometry, which is not touched if target is NULL */ 498 /* restore old geometry, which is not touched if target is NULL */
498 if (target) 499 if (target)
499 memcpy(geo, &tmp, sizeof tmp); 500 memcpy(geo, &tmp, sizeof(tmp));
500 return -ERANGE; 501 return -ERANGE;
501} 502}
502 503
@@ -1071,7 +1072,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev,
1071{ 1072{
1072 struct mxr_layer *layer; 1073 struct mxr_layer *layer;
1073 1074
1074 layer = kzalloc(sizeof *layer, GFP_KERNEL); 1075 layer = kzalloc(sizeof(*layer), GFP_KERNEL);
1075 if (layer == NULL) { 1076 if (layer == NULL) {
1076 mxr_err(mdev, "not enough memory for layer.\n"); 1077 mxr_err(mdev, "not enough memory for layer.\n");
1077 goto fail; 1078 goto fail;
diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c
index 91a6939a270a..ab6f9ef89423 100644
--- a/drivers/media/platform/s5p-tv/sdo_drv.c
+++ b/drivers/media/platform/s5p-tv/sdo_drv.c
@@ -301,7 +301,7 @@ static int sdo_probe(struct platform_device *pdev)
301 struct clk *sclk_vpll; 301 struct clk *sclk_vpll;
302 302
303 dev_info(dev, "probe start\n"); 303 dev_info(dev, "probe start\n");
304 sdev = devm_kzalloc(&pdev->dev, sizeof *sdev, GFP_KERNEL); 304 sdev = devm_kzalloc(&pdev->dev, sizeof(*sdev), GFP_KERNEL);
305 if (!sdev) { 305 if (!sdev) {
306 dev_err(dev, "not enough memory.\n"); 306 dev_err(dev, "not enough memory.\n");
307 ret = -ENOMEM; 307 ret = -ENOMEM;
@@ -341,47 +341,50 @@ static int sdo_probe(struct platform_device *pdev)
341 341
342 /* acquire clocks */ 342 /* acquire clocks */
343 sdev->sclk_dac = clk_get(dev, "sclk_dac"); 343 sdev->sclk_dac = clk_get(dev, "sclk_dac");
344 if (IS_ERR_OR_NULL(sdev->sclk_dac)) { 344 if (IS_ERR(sdev->sclk_dac)) {
345 dev_err(dev, "failed to get clock 'sclk_dac'\n"); 345 dev_err(dev, "failed to get clock 'sclk_dac'\n");
346 ret = -ENXIO; 346 ret = PTR_ERR(sdev->sclk_dac);
347 goto fail; 347 goto fail;
348 } 348 }
349 sdev->dac = clk_get(dev, "dac"); 349 sdev->dac = clk_get(dev, "dac");
350 if (IS_ERR_OR_NULL(sdev->dac)) { 350 if (IS_ERR(sdev->dac)) {
351 dev_err(dev, "failed to get clock 'dac'\n"); 351 dev_err(dev, "failed to get clock 'dac'\n");
352 ret = -ENXIO; 352 ret = PTR_ERR(sdev->dac);
353 goto fail_sclk_dac; 353 goto fail_sclk_dac;
354 } 354 }
355 sdev->dacphy = clk_get(dev, "dacphy"); 355 sdev->dacphy = clk_get(dev, "dacphy");
356 if (IS_ERR_OR_NULL(sdev->dacphy)) { 356 if (IS_ERR(sdev->dacphy)) {
357 dev_err(dev, "failed to get clock 'dacphy'\n"); 357 dev_err(dev, "failed to get clock 'dacphy'\n");
358 ret = -ENXIO; 358 ret = PTR_ERR(sdev->dacphy);
359 goto fail_dac; 359 goto fail_dac;
360 } 360 }
361 sclk_vpll = clk_get(dev, "sclk_vpll"); 361 sclk_vpll = clk_get(dev, "sclk_vpll");
362 if (IS_ERR_OR_NULL(sclk_vpll)) { 362 if (IS_ERR(sclk_vpll)) {
363 dev_err(dev, "failed to get clock 'sclk_vpll'\n"); 363 dev_err(dev, "failed to get clock 'sclk_vpll'\n");
364 ret = -ENXIO; 364 ret = PTR_ERR(sclk_vpll);
365 goto fail_dacphy; 365 goto fail_dacphy;
366 } 366 }
367 clk_set_parent(sdev->sclk_dac, sclk_vpll); 367 clk_set_parent(sdev->sclk_dac, sclk_vpll);
368 clk_put(sclk_vpll); 368 clk_put(sclk_vpll);
369 sdev->fout_vpll = clk_get(dev, "fout_vpll"); 369 sdev->fout_vpll = clk_get(dev, "fout_vpll");
370 if (IS_ERR_OR_NULL(sdev->fout_vpll)) { 370 if (IS_ERR(sdev->fout_vpll)) {
371 dev_err(dev, "failed to get clock 'fout_vpll'\n"); 371 dev_err(dev, "failed to get clock 'fout_vpll'\n");
372 ret = PTR_ERR(sdev->fout_vpll);
372 goto fail_dacphy; 373 goto fail_dacphy;
373 } 374 }
374 dev_info(dev, "fout_vpll.rate = %lu\n", clk_get_rate(sclk_vpll)); 375 dev_info(dev, "fout_vpll.rate = %lu\n", clk_get_rate(sclk_vpll));
375 376
376 /* acquire regulator */ 377 /* acquire regulator */
377 sdev->vdac = devm_regulator_get(dev, "vdd33a_dac"); 378 sdev->vdac = devm_regulator_get(dev, "vdd33a_dac");
378 if (IS_ERR_OR_NULL(sdev->vdac)) { 379 if (IS_ERR(sdev->vdac)) {
379 dev_err(dev, "failed to get regulator 'vdac'\n"); 380 dev_err(dev, "failed to get regulator 'vdac'\n");
381 ret = PTR_ERR(sdev->vdac);
380 goto fail_fout_vpll; 382 goto fail_fout_vpll;
381 } 383 }
382 sdev->vdet = devm_regulator_get(dev, "vdet"); 384 sdev->vdet = devm_regulator_get(dev, "vdet");
383 if (IS_ERR_OR_NULL(sdev->vdet)) { 385 if (IS_ERR(sdev->vdet)) {
384 dev_err(dev, "failed to get regulator 'vdet'\n"); 386 dev_err(dev, "failed to get regulator 'vdet'\n");
387 ret = PTR_ERR(sdev->vdet);
385 goto fail_fout_vpll; 388 goto fail_fout_vpll;
386 } 389 }
387 390
@@ -394,7 +397,7 @@ static int sdo_probe(struct platform_device *pdev)
394 /* configuration of interface subdevice */ 397 /* configuration of interface subdevice */
395 v4l2_subdev_init(&sdev->sd, &sdo_sd_ops); 398 v4l2_subdev_init(&sdev->sd, &sdo_sd_ops);
396 sdev->sd.owner = THIS_MODULE; 399 sdev->sd.owner = THIS_MODULE;
397 strlcpy(sdev->sd.name, "s5p-sdo", sizeof sdev->sd.name); 400 strlcpy(sdev->sd.name, "s5p-sdo", sizeof(sdev->sd.name));
398 401
399 /* set default format */ 402 /* set default format */
400 sdev->fmt = sdo_find_format(SDO_DEFAULT_STD); 403 sdev->fmt = sdo_find_format(SDO_DEFAULT_STD);
diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c b/drivers/media/platform/s5p-tv/sii9234_drv.c
index 49191aac9634..d90d2286090b 100644
--- a/drivers/media/platform/s5p-tv/sii9234_drv.c
+++ b/drivers/media/platform/s5p-tv/sii9234_drv.c
@@ -338,7 +338,7 @@ static int sii9234_probe(struct i2c_client *client,
338 } 338 }
339 339
340 ctx->gpio_n_reset = pdata->gpio_n_reset; 340 ctx->gpio_n_reset = pdata->gpio_n_reset;
341 ret = gpio_request(ctx->gpio_n_reset, "MHL_RST"); 341 ret = devm_gpio_request(dev, ctx->gpio_n_reset, "MHL_RST");
342 if (ret) { 342 if (ret) {
343 dev_err(dev, "failed to acquire MHL_RST gpio\n"); 343 dev_err(dev, "failed to acquire MHL_RST gpio\n");
344 return ret; 344 return ret;
@@ -370,7 +370,6 @@ fail_pm_get:
370 370
371fail_pm: 371fail_pm:
372 pm_runtime_disable(dev); 372 pm_runtime_disable(dev);
373 gpio_free(ctx->gpio_n_reset);
374 373
375fail: 374fail:
376 dev_err(dev, "probe failed\n"); 375 dev_err(dev, "probe failed\n");
@@ -381,11 +380,8 @@ fail:
381static int sii9234_remove(struct i2c_client *client) 380static int sii9234_remove(struct i2c_client *client)
382{ 381{
383 struct device *dev = &client->dev; 382 struct device *dev = &client->dev;
384 struct v4l2_subdev *sd = i2c_get_clientdata(client);
385 struct sii9234_context *ctx = sd_to_context(sd);
386 383
387 pm_runtime_disable(dev); 384 pm_runtime_disable(dev);
388 gpio_free(ctx->gpio_n_reset);
389 385
390 dev_info(dev, "remove successful\n"); 386 dev_info(dev, "remove successful\n");
391 387