Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-03 Thread Antti Palosaari
On 06/01/2011 08:18 PM, Bjørn Mork wrote: Bjørn Morkbj...@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

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-03 Thread Bjørn Mork
Antti Palosaari cr...@iki.fi writes: 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? None. They have the same problem, creating

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-03 Thread Antti Palosaari
On 06/03/2011 03:50 PM, Bjørn Mork wrote: Antti Palosaaricr...@iki.fi writes: 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?

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-03 Thread Bjørn Mork
Antti Palosaari cr...@iki.fi writes: On 06/03/2011 03:50 PM, Bjørn Mork wrote: This probably means that a generic i2c_tuner wrapper, similar to dvb_attach, would be useful. For the cxd2820r it is also possible to return I2C adapter as pointer from dvb_attach like pointer to FE0 is carried

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-01 Thread Antti Palosaari
On 06/01/2011 12:45 PM, Bjørn Mork wrote: Don't know the proper fix. My naïve quick-fix was just to move struct cxd2820r_priv into cxd2820r.h and making the function static inlined. However, I do see that you may not want the struct in cxd2820r.h. But I trust that you have a brilliant solution

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-01 Thread Bjørn Mork
Antti Palosaari cr...@iki.fi writes: On 06/01/2011 12:45 PM, Bjørn Mork wrote: Don't know the proper fix. My naïve quick-fix was just to move struct cxd2820r_priv into cxd2820r.h and making the function static inlined. However, I do see that you may not want the struct in cxd2820r.h. But I

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-01 Thread Bjørn Mork
Another possible solution... This is my last one, I promise :-) I looked at dvb_attach() and realized that you can ab^H^Hreuse it. This makes the patch tiny, and allow you to continue hiding struct cxd2820r_priv. Bjørn From b570bbad12c1d164ed92c6711a1775db29c4c0a7 Mon Sep 17 00:00:00 2001

Re: [bug-report] unconditionally calling cxd2820r_get_tuner_i2c_adapter() from em28xx-dvb.c creates a hard module dependency

2011-06-01 Thread Bjørn Mork
Bjørn Mork bj...@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