From 7c2c3e4c7935a28faf61479c9f915065b9acb169 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sat, 30 May 2009 21:45:46 -0300 Subject: [PATCH] --- yaml --- r: 153959 b: refs/heads/master c: 1ca27379f3673b40edbd2fec53b93c993fdb4f0c h: refs/heads/master i: 153957: d10c65169c03364ad28fe3a1f018333061972696 153955: 4357ab901cef1987a2ab43e0e21047a7c128318e 153951: 63356c2f09dd70981e4a67758a84259cc9af61d6 v: v3 --- [refs] | 2 +- .../media/video/cx231xx/cx231xx-avcore.c | 17 ++++------------- .../drivers/media/video/cx231xx/cx231xx-video.c | 10 +++------- trunk/drivers/media/video/cx231xx/cx231xx.h | 3 --- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/[refs] b/[refs] index b5fd6e77a93c..75054e241b04 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ccb83408b258f7e9f9fe763f9a7d06ebcc21134f +refs/heads/master: 1ca27379f3673b40edbd2fec53b93c993fdb4f0c diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-avcore.c b/trunk/drivers/media/video/cx231xx/cx231xx-avcore.c index 96f07d1473fb..28f48f41f218 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-avcore.c @@ -1052,22 +1052,13 @@ int cx231xx_set_audio_decoder_input(struct cx231xx *dev, /* Set resolution of the video */ int cx231xx_resolution_set(struct cx231xx *dev) { - int width, height; - u32 hscale, vscale; - int status = 0; - - width = dev->width; - height = dev->height; - - get_scale(dev, width, height, &hscale, &vscale); - /* set horzontal scale */ - status = vid_blk_write_word(dev, HSCALE_CTRL, hscale); + int status = vid_blk_write_word(dev, HSCALE_CTRL, dev->hscale); + if (status) + return status; /* set vertical scale */ - status = vid_blk_write_word(dev, VSCALE_CTRL, vscale); - - return status; + return vid_blk_write_word(dev, VSCALE_CTRL, dev->vscale); } /****************************************************************************** diff --git a/trunk/drivers/media/video/cx231xx/cx231xx-video.c b/trunk/drivers/media/video/cx231xx/cx231xx-video.c index 6a524d847110..609bae6098d3 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx-video.c +++ b/trunk/drivers/media/video/cx231xx/cx231xx-video.c @@ -893,9 +893,9 @@ static int check_dev(struct cx231xx *dev) return 0; } -void get_scale(struct cx231xx *dev, - unsigned int width, unsigned int height, - unsigned int *hscale, unsigned int *vscale) +static void get_scale(struct cx231xx *dev, + unsigned int width, unsigned int height, + unsigned int *hscale, unsigned int *vscale) { unsigned int maxw = norm_maxw(dev); unsigned int maxh = norm_maxh(dev); @@ -907,10 +907,6 @@ void get_scale(struct cx231xx *dev, *vscale = (((unsigned long)maxh) << 12) / height - 4096L; if (*vscale >= 0x4000) *vscale = 0x3fff; - - dev->hscale = *hscale; - dev->vscale = *vscale; - } /* ------------------------------------------------------------------ diff --git a/trunk/drivers/media/video/cx231xx/cx231xx.h b/trunk/drivers/media/video/cx231xx/cx231xx.h index e38eb2d425f7..a0f823ac6b8d 100644 --- a/trunk/drivers/media/video/cx231xx/cx231xx.h +++ b/trunk/drivers/media/video/cx231xx/cx231xx.h @@ -722,9 +722,6 @@ int cx231xx_set_video_input_mux(struct cx231xx *dev, u8 input); int cx231xx_set_decoder_video_input(struct cx231xx *dev, u8 pin_type, u8 input); int cx231xx_do_mode_ctrl_overrides(struct cx231xx *dev); int cx231xx_set_audio_input(struct cx231xx *dev, u8 input); -void get_scale(struct cx231xx *dev, - unsigned int width, unsigned int height, - unsigned int *hscale, unsigned int *vscale); /* Provided by cx231xx-video.c */ int cx231xx_register_extension(struct cx231xx_ops *dev);