diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-07-01 12:13:09 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-07-01 12:13:09 +0000 |
commit | 2a07da4812a2b8039516a29d30ac1d3c09a9ac36 (patch) | |
tree | 00d23c8d5c17936775675310676e9493521c9e08 /linux/drivers/media/video/tuner-core.c | |
parent | 0243568a2656b79a982d7cad00c58eb5d4fed402 (diff) | |
download | mediapointer-dvb-s2-2a07da4812a2b8039516a29d30ac1d3c09a9ac36.tar.gz mediapointer-dvb-s2-2a07da4812a2b8039516a29d30ac1d3c09a9ac36.tar.bz2 |
* tuner-core.c:
- Fixed a race condition at I2C implementation.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index e71e8df6b..ee6249263 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-core.c,v 1.36 2005/07/01 08:22:24 nsh Exp $ + * $Id: tuner-core.c,v 1.37 2005/07/01 12:13:09 mchehab Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -325,7 +325,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) t->audmode = V4L2_TUNER_MODE_STEREO; t->admin_status = T_UNINITIALIZED; - i2c_attach_client(&t->i2c); tuner_info("chip found @ 0x%x (%s)\n", addr << 1, adap->name); /* TEA5767 autodetection code - only for addr = 0xc0 */ @@ -334,6 +333,9 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) t->type = TUNER_TEA5767; t->admin_status = T_RADIO|T_STANDBY; default_admin_status &= ~T_RADIO; + + /* Should be just before return */ + i2c_attach_client(&t->i2c); return 0; } } @@ -345,6 +347,8 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) default_admin_status = T_UNINITIALIZED; } + /* Should be just before return */ + i2c_attach_client(&t->i2c); return 0; } |