linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Olli Salonen <olli.salonen@iki.fi>, linux-media@vger.kernel.org
Subject: Re: [PATCH 2/3] af9035: Add possibility to define which I2C adapter to use
Date: Tue, 23 Sep 2014 15:37:25 +0300	[thread overview]
Message-ID: <54216985.8010505@iki.fi> (raw)
In-Reply-To: <1411296799-3525-3-git-send-email-olli.salonen@iki.fi>

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


On 09/21/2014 01:53 PM, Olli Salonen wrote:
> Some I2C tuner drivers require that the I2C device of the tuner is added to the I2C adapter of the demodulator (Si2168+Si2157 for example). Add possibility to tell af9035_add_i2c_dev which I2C adapter should be used.
>
> Cc: crope@iki.fi
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>   drivers/media/usb/dvb-usb-v2/af9035.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c
> index 440ecb4..c50d27d 100644
> --- a/drivers/media/usb/dvb-usb-v2/af9035.c
> +++ b/drivers/media/usb/dvb-usb-v2/af9035.c
> @@ -194,12 +194,11 @@ static int af9035_wr_reg_mask(struct dvb_usb_device *d, u32 reg, u8 val,
>   }
>
>   static int af9035_add_i2c_dev(struct dvb_usb_device *d, char *type, u8 addr,
> -		void *platform_data)
> +		void *platform_data, struct i2c_adapter *adapter)
>   {
>   	int ret, num;
>   	struct state *state = d_to_priv(d);
>   	struct i2c_client *client;
> -	struct i2c_adapter *adapter = &d->i2c_adap;
>   	struct i2c_board_info board_info = {
>   		.addr = addr,
>   		.platform_data = platform_data,
> @@ -1091,7 +1090,7 @@ static int af9035_frontend_attach(struct dvb_usb_adapter *adap)
>   	state->af9033_config[adap->id].fe = &adap->fe[0];
>   	state->af9033_config[adap->id].ops = &state->ops;
>   	ret = af9035_add_i2c_dev(d, "af9033", state->af9033_i2c_addr[adap->id],
> -			&state->af9033_config[adap->id]);
> +			&state->af9033_config[adap->id], &d->i2c_adap);
>   	if (ret)
>   		goto err;
>
> @@ -1382,7 +1381,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
>
>   		ret = af9035_add_i2c_dev(d, "it913x",
>   				state->af9033_i2c_addr[adap->id] >> 1,
> -				&it913x_config);
> +				&it913x_config, &d->i2c_adap);
>   		if (ret)
>   			goto err;
>
> @@ -1407,7 +1406,7 @@ static int af9035_tuner_attach(struct dvb_usb_adapter *adap)
>
>   		ret = af9035_add_i2c_dev(d, "it913x",
>   				state->af9033_i2c_addr[adap->id] >> 1,
> -				&it913x_config);
> +				&it913x_config, &d->i2c_adap);
>   		if (ret)
>   			goto err;
>
>

-- 
http://palosaari.fi/

  reply	other threads:[~2014-09-23 12:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-21 10:53 [PATCH 0/3] IT930x USB DVB-T2/C tuner Olli Salonen
2014-09-21 10:53 ` [PATCH 1/3] si2157: Add support for Si2147-A30 Olli Salonen
2014-09-23 12:36   ` Antti Palosaari
2014-09-21 10:53 ` [PATCH 2/3] af9035: Add possibility to define which I2C adapter to use Olli Salonen
2014-09-23 12:37   ` Antti Palosaari [this message]
2014-09-21 10:53 ` [PATCH 3/3] af9035: Add support for IT930x USB bridge Olli Salonen
2014-09-23 12:46   ` Antti Palosaari
2014-09-23 13:25     ` Olli Salonen

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=54216985.8010505@iki.fi \
    --to=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=olli.salonen@iki.fi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).