diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-02-07 03:49:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-07 03:49:14 -0500 |
commit | 3593cab5d62c4c7abced1076710f9bc2d8847433 (patch) | |
tree | dd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/dvb/bt8xx/dst.c | |
parent | 538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff) |
V4L/DVB (3318b): sem2mutex: drivers/media/, #2
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/bt8xx/dst.c')
-rw-r--r-- | drivers/media/dvb/bt8xx/dst.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c index 3a2ff1cc24b7..d800df1212c5 100644 --- a/drivers/media/dvb/bt8xx/dst.c +++ b/drivers/media/dvb/bt8xx/dst.c | |||
@@ -910,7 +910,7 @@ static int dst_get_device_id(struct dst_state *state) | |||
910 | 910 | ||
911 | static int dst_probe(struct dst_state *state) | 911 | static int dst_probe(struct dst_state *state) |
912 | { | 912 | { |
913 | sema_init(&state->dst_mutex, 1); | 913 | mutex_init(&state->dst_mutex); |
914 | if ((rdc_8820_reset(state)) < 0) { | 914 | if ((rdc_8820_reset(state)) < 0) { |
915 | dprintk(verbose, DST_ERROR, 1, "RDC 8820 RESET Failed."); | 915 | dprintk(verbose, DST_ERROR, 1, "RDC 8820 RESET Failed."); |
916 | return -1; | 916 | return -1; |
@@ -962,7 +962,7 @@ int dst_command(struct dst_state *state, u8 *data, u8 len) | |||
962 | { | 962 | { |
963 | u8 reply; | 963 | u8 reply; |
964 | 964 | ||
965 | down(&state->dst_mutex); | 965 | mutex_lock(&state->dst_mutex); |
966 | if ((dst_comm_init(state)) < 0) { | 966 | if ((dst_comm_init(state)) < 0) { |
967 | dprintk(verbose, DST_NOTICE, 1, "DST Communication Initialization Failed."); | 967 | dprintk(verbose, DST_NOTICE, 1, "DST Communication Initialization Failed."); |
968 | goto error; | 968 | goto error; |
@@ -1013,11 +1013,11 @@ int dst_command(struct dst_state *state, u8 *data, u8 len) | |||
1013 | dprintk(verbose, DST_INFO, 1, "checksum failure"); | 1013 | dprintk(verbose, DST_INFO, 1, "checksum failure"); |
1014 | goto error; | 1014 | goto error; |
1015 | } | 1015 | } |
1016 | up(&state->dst_mutex); | 1016 | mutex_unlock(&state->dst_mutex); |
1017 | return 0; | 1017 | return 0; |
1018 | 1018 | ||
1019 | error: | 1019 | error: |
1020 | up(&state->dst_mutex); | 1020 | mutex_unlock(&state->dst_mutex); |
1021 | return -EIO; | 1021 | return -EIO; |
1022 | 1022 | ||
1023 | } | 1023 | } |
@@ -1128,7 +1128,7 @@ static int dst_write_tuna(struct dvb_frontend *fe) | |||
1128 | dst_set_voltage(fe, SEC_VOLTAGE_13); | 1128 | dst_set_voltage(fe, SEC_VOLTAGE_13); |
1129 | } | 1129 | } |
1130 | state->diseq_flags &= ~(HAS_LOCK | ATTEMPT_TUNE); | 1130 | state->diseq_flags &= ~(HAS_LOCK | ATTEMPT_TUNE); |
1131 | down(&state->dst_mutex); | 1131 | mutex_lock(&state->dst_mutex); |
1132 | if ((dst_comm_init(state)) < 0) { | 1132 | if ((dst_comm_init(state)) < 0) { |
1133 | dprintk(verbose, DST_DEBUG, 1, "DST Communication initialization failed."); | 1133 | dprintk(verbose, DST_DEBUG, 1, "DST Communication initialization failed."); |
1134 | goto error; | 1134 | goto error; |
@@ -1160,11 +1160,11 @@ static int dst_write_tuna(struct dvb_frontend *fe) | |||
1160 | state->diseq_flags |= ATTEMPT_TUNE; | 1160 | state->diseq_flags |= ATTEMPT_TUNE; |
1161 | retval = dst_get_tuna(state); | 1161 | retval = dst_get_tuna(state); |
1162 | werr: | 1162 | werr: |
1163 | up(&state->dst_mutex); | 1163 | mutex_unlock(&state->dst_mutex); |
1164 | return retval; | 1164 | return retval; |
1165 | 1165 | ||
1166 | error: | 1166 | error: |
1167 | up(&state->dst_mutex); | 1167 | mutex_unlock(&state->dst_mutex); |
1168 | return -EIO; | 1168 | return -EIO; |
1169 | } | 1169 | } |
1170 | 1170 | ||