aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/b2c2/flexcop.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2008-03-29 19:49:57 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:07:56 -0400
commit6394cf53abc0b3a2db9e8b947ef5c77b16861ec8 (patch)
tree6d442ab2e89d17ef963ee840ba50440e225f30cb /drivers/media/dvb/b2c2/flexcop.c
parent0b5afdd2ea5f52d260d1e42d43fb0fa09ec0da2f (diff)
V4L/DVB (7469): Preparation for supporting new devices, cleanup and saneness
To prepare the support for new device to the flexcop-family some preparation and cleanups was done + some saneness: - created an i2c-adapter for each i2c-port available. Easier usage for devices with several device on different i2c-busses - initialize i2c before doing the eeprom read - changed the way to attach the different frontends, easier to read now - enabled support for i2c-devices having no register address (1-byte access) Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop.c')
-rw-r--r--drivers/media/dvb/b2c2/flexcop.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop.c b/drivers/media/dvb/b2c2/flexcop.c
index 2ddafd071c97..205146c24129 100644
--- a/drivers/media/dvb/b2c2/flexcop.c
+++ b/drivers/media/dvb/b2c2/flexcop.c
@@ -257,6 +257,12 @@ int flexcop_device_initialize(struct flexcop_device *fc)
257 if ((ret = flexcop_dvb_init(fc))) 257 if ((ret = flexcop_dvb_init(fc)))
258 goto error; 258 goto error;
259 259
260 /* i2c has to be done before doing EEProm stuff -
261 * because the EEProm is accessed via i2c */
262 ret = flexcop_i2c_init(fc);
263 if (ret)
264 goto error;
265
260 /* do the MAC address reading after initializing the dvb_adapter */ 266 /* do the MAC address reading after initializing the dvb_adapter */
261 if (fc->get_mac_addr(fc, 0) == 0) { 267 if (fc->get_mac_addr(fc, 0) == 0) {
262 u8 *b = fc->dvb_adapter.proposed_mac; 268 u8 *b = fc->dvb_adapter.proposed_mac;
@@ -266,10 +272,6 @@ int flexcop_device_initialize(struct flexcop_device *fc)
266 } else 272 } else
267 warn("reading of MAC address failed.\n"); 273 warn("reading of MAC address failed.\n");
268 274
269
270 if ((ret = flexcop_i2c_init(fc)))
271 goto error;
272
273 if ((ret = flexcop_frontend_init(fc))) 275 if ((ret = flexcop_frontend_init(fc)))
274 goto error; 276 goto error;
275 277