summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/msp3400-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <devnull@localhost>2005-12-02 20:12:36 +0000
committerHans Verkuil <devnull@localhost>2005-12-02 20:12:36 +0000
commitce248b700d20e20f26e8a01d353aece4810eb144 (patch)
tree608bcbaf5c4d230cbb7f7f51a33a937fed388220 /linux/drivers/media/video/msp3400-driver.c
parentab625030b5323e2c45002cb0941e411ef1461a5e (diff)
downloadmediapointer-dvb-s2-ce248b700d20e20f26e8a01d353aece4810eb144.tar.gz
mediapointer-dvb-s2-ce248b700d20e20f26e8a01d353aece4810eb144.tar.bz2
fix compile error, remove dead code and volume scaling
Fix compile error (missing '}') in em28xx-video.c. Remove dead code and volume scaling from msp3400.c. Volume scaling does not belong there, it should be done in the driver for the card that uses the msp3400 if needed, not in the msp3400.c source. The volume scaling code gave problems with the ivtv driver which does not need to do any scaling. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/msp3400-driver.c')
-rw-r--r--linux/drivers/media/video/msp3400-driver.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 633909231..b4e425828 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -179,9 +179,6 @@ struct msp3400c {
#define HAVE_SIMPLER(msp) ((msp->rev1 & 0xff) >= 'G'-'@')
#define HAVE_RADIO(msp) ((msp->rev1 & 0xff) >= 'G'-'@')
-#define MSP3400_MAX 4
-static struct i2c_client *msps[MSP3400_MAX];
-
#define VIDEO_MODE_RADIO 16 /* norm magic for radio mode */
/* ---------------------------------------------------------------------- */
@@ -483,10 +480,8 @@ static void msp3400c_setvolume(struct i2c_client *client,
int vol = 0, val = 0, balance = 0;
if (!muted) {
- /* 0x7f instead if 0x73 here has sound quality issues,
- * probably due to overmodulation + clipping ... */
vol = (left > right) ? left : right;
- val = (vol * 0x73 / 65535) << 8;
+ val = (vol * 0x7f / 65535) << 8;
}
if (vol > 0) {
balance = ((right - left) * 127) / vol;
@@ -2378,21 +2373,12 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
#endif
- /* update our own array */
- for (i = 0; i < MSP3400_MAX; i++) {
- if (NULL == msps[i]) {
- msps[i] = client;
- break;
- }
- }
-
return 0;
}
static int msp_detach(struct i2c_client *client)
{
struct msp3400c *msp = i2c_get_clientdata(client);
- int i;
/* shutdown control thread */
if (msp->kthread) {
@@ -2401,14 +2387,6 @@ static int msp_detach(struct i2c_client *client)
}
msp3400c_reset(client);
- /* update our own array */
- for (i = 0; i < MSP3400_MAX; i++) {
- if (client == msps[i]) {
- msps[i] = NULL;
- break;
- }
- }
-
i2c_detach_client(client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;