All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Benjamin Larsson <benjamin@southpole.se>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 2/2] mn88473: simplify bandwidth registers setting code
Date: Tue, 13 Jan 2015 17:54:40 +0200	[thread overview]
Message-ID: <54B53FC0.8090704@iki.fi> (raw)
In-Reply-To: <1421105006-22437-2-git-send-email-benjamin@southpole.se>

On 01/13/2015 01:23 AM, Benjamin Larsson wrote:
> Signed-off-by: Benjamin Larsson <benjamin@southpole.se>

Reviewed-by: Antti Palosaari <crope@iki.fi>

Antti

> ---
>   drivers/staging/media/mn88473/mn88473.c | 27 ++++++---------------------
>   1 file changed, 6 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/staging/media/mn88473/mn88473.c b/drivers/staging/media/mn88473/mn88473.c
> index b65e519..994294c 100644
> --- a/drivers/staging/media/mn88473/mn88473.c
> +++ b/drivers/staging/media/mn88473/mn88473.c
> @@ -59,28 +59,13 @@ static int mn88473_set_frontend(struct dvb_frontend *fe)
>   		goto err;
>   	}
>
> -	switch (c->delivery_system) {
> -	case SYS_DVBT:
> -	case SYS_DVBT2:
> -		if (c->bandwidth_hz <= 6000000) {
> -			/* IF 3570000 Hz, BW 6000000 Hz */
> -			memcpy(bw_val, "\xe9\x55\x55\x1c\x29\x1c\x29", 7);
> -		} else if (c->bandwidth_hz <= 7000000) {
> -			/* IF 4570000 Hz, BW 7000000 Hz */
> -			memcpy(bw_val, "\xc8\x00\x00\x17\x0a\x17\x0a", 7);
> -		} else if (c->bandwidth_hz <= 8000000) {
> -			/* IF 4570000 Hz, BW 8000000 Hz */
> -			memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
> -		} else {
> -			ret = -EINVAL;
> -			goto err;
> -		}
> -		break;
> -	case SYS_DVBC_ANNEX_A:
> -		/* IF 5070000 Hz, BW 8000000 Hz */
> +	if (c->bandwidth_hz <= 6000000) {
> +		memcpy(bw_val, "\xe9\x55\x55\x1c\x29\x1c\x29", 7);
> +	} else if (c->bandwidth_hz <= 7000000) {
> +		memcpy(bw_val, "\xc8\x00\x00\x17\x0a\x17\x0a", 7);
> +	} else if (c->bandwidth_hz <= 8000000) {
>   		memcpy(bw_val, "\xaf\x00\x00\x11\xec\x11\xec", 7);
> -		break;
> -	default:
> +	} else {
>   		ret = -EINVAL;
>   		goto err;
>   	}
>

-- 
http://palosaari.fi/

  reply	other threads:[~2015-01-13 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12 23:23 [PATCH 1/2] mn88473: calculate the IF register values Benjamin Larsson
2015-01-12 23:23 ` [PATCH 2/2] mn88473: simplify bandwidth registers setting code Benjamin Larsson
2015-01-13 15:54   ` Antti Palosaari [this message]
2015-01-13 15:53 ` [PATCH 1/2] mn88473: calculate the IF register values Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B53FC0.8090704@iki.fi \
    --to=crope@iki.fi \
    --cc=benjamin@southpole.se \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.