aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c4
-rw-r--r--drivers/media/video/msp3400.c21
2 files changed, 2 insertions, 23 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 446ba3b2ac36..5e831fccf3fd 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1089,9 +1089,7 @@ static int em28xx_do_ioctl(struct inode *inode, struct file *filp,
1089 if (dev->decoder == EM28XX_TVP5150) { 1089 if (dev->decoder == EM28XX_TVP5150) {
1090 em28xx_i2c_call_clients(dev,cmd,arg); 1090 em28xx_i2c_call_clients(dev,cmd,arg);
1091 return 0; 1091 return 0;
1092 } else { 1092 } else if (!dev->has_msp34xx) {
1093
1094 if (!dev->has_msp34xx){
1095 for (i = 0; i < ARRAY_SIZE(em28xx_qctrl); i++) { 1093 for (i = 0; i < ARRAY_SIZE(em28xx_qctrl); i++) {
1096 if (ctrl->id == em28xx_qctrl[i].id) { 1094 if (ctrl->id == em28xx_qctrl[i].id) {
1097 if (ctrl->value < 1095 if (ctrl->value <
diff --git a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c
index 8d47d7894248..6cff06a7eab7 100644
--- a/drivers/media/video/msp3400.c
+++ b/drivers/media/video/msp3400.c
@@ -473,10 +473,8 @@ static void msp3400c_setvolume(struct i2c_client *client,
473 int vol = 0, val = 0, balance = 0; 473 int vol = 0, val = 0, balance = 0;
474 474
475 if (!muted) { 475 if (!muted) {
476 /* 0x7f instead if 0x73 here has sound quality issues,
477 * probably due to overmodulation + clipping ... */
478 vol = (left > right) ? left : right; 476 vol = (left > right) ? left : right;
479 val = (vol * 0x73 / 65535) << 8; 477 val = (vol * 0x7f / 65535) << 8;
480 } 478 }
481 if (vol > 0) { 479 if (vol > 0) {
482 balance = ((right - left) * 127) / vol; 480 balance = ((right - left) * 127) / vol;
@@ -2351,21 +2349,12 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
2351 /* done */ 2349 /* done */
2352 i2c_attach_client(client); 2350 i2c_attach_client(client);
2353 2351
2354 /* update our own array */
2355 for (i = 0; i < MSP3400_MAX; i++) {
2356 if (NULL == msps[i]) {
2357 msps[i] = client;
2358 break;
2359 }
2360 }
2361
2362 return 0; 2352 return 0;
2363} 2353}
2364 2354
2365static int msp_detach(struct i2c_client *client) 2355static int msp_detach(struct i2c_client *client)
2366{ 2356{
2367 struct msp3400c *msp = i2c_get_clientdata(client); 2357 struct msp3400c *msp = i2c_get_clientdata(client);
2368 int i;
2369 2358
2370 /* shutdown control thread */ 2359 /* shutdown control thread */
2371 if (msp->kthread) { 2360 if (msp->kthread) {
@@ -2374,14 +2363,6 @@ static int msp_detach(struct i2c_client *client)
2374 } 2363 }
2375 msp3400c_reset(client); 2364 msp3400c_reset(client);
2376 2365
2377 /* update our own array */
2378 for (i = 0; i < MSP3400_MAX; i++) {
2379 if (client == msps[i]) {
2380 msps[i] = NULL;
2381 break;
2382 }
2383 }
2384
2385 i2c_detach_client(client); 2366 i2c_detach_client(client);
2386 2367
2387 kfree(msp); 2368 kfree(msp);