From: Antti Palosaari <crope@iki.fi>
To: "Bjørn Mork" <bjorn@mork.no>
Cc: Steve Kerrison <steve@stevekerrison.com>, linux-media@vger.kernel.org
Subject: Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency
Date: Fri, 03 Jun 2011 15:21:58 +0300 [thread overview]
Message-ID: <4DE8D1E6.4000300@iki.fi> (raw)
In-Reply-To: <87tyc9lbb1.fsf@nemi.mork.no>
On 06/01/2011 08:18 PM, Bjørn Mork wrote:
> Bjørn Mork<bjorn@mork.no> writes:
>
>> diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
>> index 7904ca4..d994592 100644
>> --- a/drivers/media/video/em28xx/em28xx-dvb.c
>> +++ b/drivers/media/video/em28xx/em28xx-dvb.c
>> @@ -669,7 +669,8 @@ static int dvb_init(struct em28xx *dev)
>> &em28xx_cxd2820r_config,&dev->i2c_adap, NULL);
>> if (dvb->fe[0]) {
>> struct i2c_adapter *i2c_tuner;
>> - i2c_tuner = cxd2820r_get_tuner_i2c_adapter(dvb->fe[0]);
>> + /* we don't really attach i2c_tuner. Just reusing the symbol logic */
>> + i2c_tuner = dvb_attach(cxd2820r_get_tuner_i2c_adapter, dvb->fe[0]);
>
> Except that this really messes up the reference count, and need to have
> a matching symbol_put... So you should probably code it with
> symbol_request()/symbol_put() if you want to go this way instead of
> the dvb_attach shortcut .
There is some other FEs having also I2C adapter, I wonder how those
handle this situation. I looked example from cx24123 and s5h1420
drivers, both used by flexcop.
Did you see what is magic used those devices?
best regards,
Antti
--
http://palosaari.fi/
next prev parent reply other threads:[~2011-06-03 12:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 9:45 [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency Bjørn Mork
2011-06-01 9:49 ` Antti Palosaari
2011-06-01 10:31 ` Bjørn Mork
2011-06-01 10:53 ` Bjørn Mork
2011-06-01 17:18 ` Bjørn Mork
2011-06-03 12:21 ` Antti Palosaari [this message]
2011-06-03 12:50 ` Bjørn Mork
2011-06-03 12:59 ` Antti Palosaari
2011-06-03 13:20 ` Bjørn Mork
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=4DE8D1E6.4000300@iki.fi \
--to=crope@iki.fi \
--cc=bjorn@mork.no \
--cc=linux-media@vger.kernel.org \
--cc=steve@stevekerrison.com \
/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