aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-audio.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-audio.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 7e61d4a1784..a45ede0a8cf 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -98,8 +98,7 @@ static int msp3400_check(struct pvr2_msp3400_handler *ctxt)
98 unsigned long msk; 98 unsigned long msk;
99 unsigned int idx; 99 unsigned int idx;
100 100
101 for (idx = 0; idx < sizeof(msp3400_ops)/sizeof(msp3400_ops[0]); 101 for (idx = 0; idx < ARRAY_SIZE(msp3400_ops); idx++) {
102 idx++) {
103 msk = 1 << idx; 102 msk = 1 << idx;
104 if (ctxt->stale_mask & msk) continue; 103 if (ctxt->stale_mask & msk) continue;
105 if (msp3400_ops[idx].check(ctxt)) { 104 if (msp3400_ops[idx].check(ctxt)) {
@@ -115,8 +114,7 @@ static void msp3400_update(struct pvr2_msp3400_handler *ctxt)
115 unsigned long msk; 114 unsigned long msk;
116 unsigned int idx; 115 unsigned int idx;
117 116
118 for (idx = 0; idx < sizeof(msp3400_ops)/sizeof(msp3400_ops[0]); 117 for (idx = 0; idx < ARRAY_SIZE(msp3400_ops); idx++) {
119 idx++) {
120 msk = 1 << idx; 118 msk = 1 << idx;
121 if (!(ctxt->stale_mask & msk)) continue; 119 if (!(ctxt->stale_mask & msk)) continue;
122 ctxt->stale_mask &= ~msk; 120 ctxt->stale_mask &= ~msk;
@@ -159,8 +157,7 @@ int pvr2_i2c_msp3400_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
159 ctxt->i2c_handler.func_table = &msp3400_funcs; 157 ctxt->i2c_handler.func_table = &msp3400_funcs;
160 ctxt->client = cp; 158 ctxt->client = cp;
161 ctxt->hdw = hdw; 159 ctxt->hdw = hdw;
162 ctxt->stale_mask = (1 << (sizeof(msp3400_ops)/ 160 ctxt->stale_mask = (1 << ARRAY_SIZE(msp3400_ops)) - 1;
163 sizeof(msp3400_ops[0]))) - 1;
164 cp->handler = &ctxt->i2c_handler; 161 cp->handler = &ctxt->i2c_handler;
165 pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L2 handler set up", 162 pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x msp3400 V4L2 handler set up",
166 cp->client->addr); 163 cp->client->addr);