git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
media
/
dvb
/
frontends
/
bcm3510.c
diff --git
a/drivers/media/dvb/frontends/bcm3510.c
b/drivers/media/dvb/frontends/bcm3510.c
index
caaee89
..
baeb311
100644
(file)
--- a/
drivers/media/dvb/frontends/bcm3510.c
+++ b/
drivers/media/dvb/frontends/bcm3510.c
@@
-39,6
+39,7
@@
#include <linux/jiffies.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/string.h>
#include <linux/slab.h>
+#include <linux/mutex.h>
#include "dvb_frontend.h"
#include "bcm3510.h"
#include "dvb_frontend.h"
#include "bcm3510.h"
@@
-47,12
+48,11
@@
struct bcm3510_state {
struct i2c_adapter* i2c;
struct bcm3510_state {
struct i2c_adapter* i2c;
- struct dvb_frontend_ops ops;
const struct bcm3510_config* config;
struct dvb_frontend frontend;
/* demodulator private data */
const struct bcm3510_config* config;
struct dvb_frontend frontend;
/* demodulator private data */
- struct
semaphore hab_sem
;
+ struct
mutex hab_mutex
;
u8 firmware_loaded:1;
unsigned long next_status_check;
u8 firmware_loaded:1;
unsigned long next_status_check;
@@
-213,7
+213,7
@@
static int bcm3510_do_hab_cmd(struct bcm3510_state *st, u8 cmd, u8 msgid, u8 *ob
dbufout(ob,olen+2,deb_hab);
deb_hab("\n");
dbufout(ob,olen+2,deb_hab);
deb_hab("\n");
- if (
down_interruptible(&st->hab_sem
) < 0)
+ if (
mutex_lock_interruptible(&st->hab_mutex
) < 0)
return -EAGAIN;
if ((ret = bcm3510_hab_send_request(st, ob, olen+2)) < 0 ||
return -EAGAIN;
if ((ret = bcm3510_hab_send_request(st, ob, olen+2)) < 0 ||
@@
-226,7
+226,7
@@
static int bcm3510_do_hab_cmd(struct bcm3510_state *st, u8 cmd, u8 msgid, u8 *ob
memcpy(ibuf,&ib[2],ilen);
error:
memcpy(ibuf,&ib[2],ilen);
error:
-
up(&st->hab_sem
);
+
mutex_unlock(&st->hab_mutex
);
return ret;
}
return ret;
}
@@
-790,13
+790,12
@@
struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
state->config = config;
state->i2c = i2c;
state->config = config;
state->i2c = i2c;
- memcpy(&state->ops, &bcm3510_ops, sizeof(struct dvb_frontend_ops));
/* create dvb_frontend */
/* create dvb_frontend */
-
state->frontend.ops = &state->ops
;
+
memcpy(&state->frontend.ops, &bcm3510_ops, sizeof(struct dvb_frontend_ops))
;
state->frontend.demodulator_priv = state;
state->frontend.demodulator_priv = state;
-
sema_init(&state->hab_sem, 1
);
+
mutex_init(&state->hab_mutex
);
if ((ret = bcm3510_readB(state,0xe0,&v)) < 0)
goto error;
if ((ret = bcm3510_readB(state,0xe0,&v)) < 0)
goto error;