[git:v4l-dvb/v2.6.37] V4L/DVB: tvaudio: remove obsolete tda8425 initialization

2010-09-24 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: tvaudio: remove obsolete tda8425 initialization
Author:  Hans Verkuil 
Date:Wed Sep 15 16:07:08 2010 -0300

The tda8425 initialization function sets up the inputmap for riva boards.
After some digging I discovered that this was for the V4L rivatv driver
that is found on sourceforge. This driver hasn't been maintained since the
last 5 years and will no longer work with the current v4l framework.

So we can safely remove this.

Signed-off-by: Hans Verkuil 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/media/video/tvaudio.c |   13 -
 1 files changed, 0 insertions(+), 13 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=dace3857de7a16b83ae7d4e13c94de8e4b267d2a

diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 9a836e0..a25e2b5 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -1226,18 +1226,6 @@ static int tea6320_initialize(struct CHIPSTATE * chip)
 static int tda8425_shift10(int val) { return (val >> 10) | 0xc0; }
 static int tda8425_shift12(int val) { return (val >> 12) | 0xf0; }
 
-static int tda8425_initialize(struct CHIPSTATE *chip)
-{
-   struct CHIPDESC *desc = chip->desc;
-   struct i2c_client *c = v4l2_get_subdevdata(&chip->sd);
-   int inputmap[4] = { /* tuner*/ TDA8425_S1_CH2, /* radio  */ 
TDA8425_S1_CH1,
-   /* extern   */ TDA8425_S1_CH1, /* intern */ 
TDA8425_S1_OFF};
-
-   if (c->adapter->id == I2C_HW_B_RIVA)
-   memcpy(desc->inputmap, inputmap, sizeof(inputmap));
-   return 0;
-}
-
 static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
 {
int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;
@@ -1573,7 +1561,6 @@ static struct CHIPDESC chiplist[] = {
.treblereg  = TDA8425_TR,
 
/* callbacks */
-   .initialize = tda8425_initialize,
.volfunc= tda8425_shift10,
.bassfunc   = tda8425_shift12,
.treblefunc = tda8425_shift12,

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:v4l-dvb/v2.6.37] V4L/DVB: cx22702: Clean up register access functions

2010-09-24 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: cx22702: Clean up register access functions
Author:  Jean Delvare 
Date:Fri Sep 10 14:03:07 2010 -0300

* Avoid temporary variables.
* Optimize success paths.
* Make error messages consistently verbose.

Signed-off-by: Jean Delvare 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/media/dvb/frontends/cx22702.c |   23 +--
 1 files changed, 13 insertions(+), 10 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=2999ff02c2abfd906e2030e67bbb8a23f2cb20ee

diff --git a/drivers/media/dvb/frontends/cx22702.c 
b/drivers/media/dvb/frontends/cx22702.c
index 00b5c7e..c799fdf 100644
--- a/drivers/media/dvb/frontends/cx22702.c
+++ b/drivers/media/dvb/frontends/cx22702.c
@@ -92,33 +92,36 @@ static int cx22702_writereg(struct cx22702_state *state, u8 
reg, u8 data)
 
ret = i2c_transfer(state->i2c, &msg, 1);
 
-   if (ret != 1)
+   if (unlikely(ret != 1)) {
printk(KERN_ERR
"%s: error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
__func__, reg, data, ret);
+   return -1;
+   }
 
-   return (ret != 1) ? -1 : 0;
+   return 0;
 }
 
 static u8 cx22702_readreg(struct cx22702_state *state, u8 reg)
 {
int ret;
-   u8 b0[] = { reg };
-   u8 b1[] = { 0 };
+   u8 data;
 
struct i2c_msg msg[] = {
{ .addr = state->config->demod_address, .flags = 0,
-   .buf = b0, .len = 1 },
+   .buf = ®, .len = 1 },
{ .addr = state->config->demod_address, .flags = I2C_M_RD,
-   .buf = b1, .len = 1 } };
+   .buf = &data, .len = 1 } };
 
ret = i2c_transfer(state->i2c, msg, 2);
 
-   if (ret != 2)
-   printk(KERN_ERR "%s: readreg error (ret == %i)\n",
-   __func__, ret);
+   if (unlikely(ret != 2)) {
+   printk(KERN_ERR "%s: error (reg == 0x%02x, ret == %i)\n",
+   __func__, reg, ret);
+   return 0;
+   }
 
-   return b1[0];
+   return data;
 }
 
 static int cx22702_set_inversion(struct cx22702_state *state, int inversion)

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:v4l-dvb/v2.6.37] V4L/DVB: dvb: Convert "mutex" to semaphore

2010-09-24 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: dvb: Convert "mutex" to semaphore
Author:  Thomas Gleixner 
Date:Tue Sep 7 11:33:27 2010 -0300

Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/media/dvb/dvb-core/dvb_frontend.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=ddad8df4bb05845f2a5de747363885322cede73c

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c 
b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 4d45b7d..083ed15 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -702,7 +702,7 @@ static void dvb_frontend_stop(struct dvb_frontend *fe)
 
kthread_stop(fepriv->thread);
 
-   init_MUTEX (&fepriv->sem);
+   sema_init(&fepriv->sem, 1);
fepriv->state = FESTATE_IDLE;
 
/* paranoia check in case a signal arrived */
@@ -2061,7 +2061,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
}
fepriv = fe->frontend_priv;
 
-   init_MUTEX (&fepriv->sem);
+   sema_init(&fepriv->sem, 1);
init_waitqueue_head (&fepriv->wait_queue);
init_waitqueue_head (&fepriv->events.wait_queue);
mutex_init(&fepriv->events.mtx);

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:v4l-dvb/v2.6.37] V4L/DVB: cx22702: Drop useless initializations to 0

2010-09-24 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: cx22702: Drop useless initializations to 0
Author:  Jean Delvare 
Date:Fri Sep 10 10:32:21 2010 -0300

These variables are either unconditionally set right afterward, or
already set to 0 by kzalloc.

Signed-off-by: Jean Delvare 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/media/dvb/frontends/cx22702.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=e43a749e1194a60905e32de7603a969220dde345

diff --git a/drivers/media/dvb/frontends/cx22702.c 
b/drivers/media/dvb/frontends/cx22702.c
index c799fdf..c3681d1 100644
--- a/drivers/media/dvb/frontends/cx22702.c
+++ b/drivers/media/dvb/frontends/cx22702.c
@@ -508,7 +508,7 @@ static int cx22702_read_signal_strength(struct dvb_frontend 
*fe,
 {
struct cx22702_state *state = fe->demodulator_priv;
 
-   u16 rs_ber = 0;
+   u16 rs_ber;
rs_ber = cx22702_readreg(state, 0x23);
*signal_strength = (rs_ber << 8) | rs_ber;
 
@@ -519,7 +519,7 @@ static int cx22702_read_snr(struct dvb_frontend *fe, u16 
*snr)
 {
struct cx22702_state *state = fe->demodulator_priv;
 
-   u16 rs_ber = 0;
+   u16 rs_ber;
if (cx22702_readreg(state, 0xE4) & 0x02) {
/* Realtime statistics */
rs_ber = (cx22702_readreg(state, 0xDE) & 0x7F) << 7
@@ -590,7 +590,6 @@ struct dvb_frontend *cx22702_attach(const struct 
cx22702_config *config,
/* setup the state */
state->config = config;
state->i2c = i2c;
-   state->prevUCBlocks = 0;
 
/* check if the demod is there */
if (cx22702_readreg(state, 0x1f) != 0x3)

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits


[git:v4l-dvb/v2.6.37] V4L/DVB: tm6000: bugfix data handling

2010-09-24 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media-tree.git tree:

Subject: V4L/DVB: tm6000: bugfix data handling
Author:  Stefan Ringel 
Date:Thu Sep 9 14:45:22 2010 -0300

Signed-off-by: Stefan Ringel 
Signed-off-by: Mauro Carvalho Chehab 

 drivers/staging/tm6000/tm6000-input.c |   61 +
 1 files changed, 39 insertions(+), 22 deletions(-)

---

http://git.linuxtv.org/media-tree.git?a=commitdiff;h=bb940f4bace6b4fcbc49a67ec0774632247d6376

diff --git a/drivers/staging/tm6000/tm6000-input.c 
b/drivers/staging/tm6000/tm6000-input.c
index 7b07096..daca3a5 100644
--- a/drivers/staging/tm6000/tm6000-input.c
+++ b/drivers/staging/tm6000/tm6000-input.c
@@ -46,7 +46,7 @@ MODULE_PARM_DESC(enable_ir, "enable ir (default is enable)");
}
 
 struct tm6000_ir_poll_result {
-   u8 rc_data[4];
+   u16 rc_data;
 };
 
 struct tm6000_IR {
@@ -60,9 +60,9 @@ struct tm6000_IR {
int polling;
struct delayed_work work;
u8  wait:1;
+   u8  key:1;
struct urb  *int_urb;
u8  *urb_data;
-   u8  key:1;
 
int (*get_key) (struct tm6000_IR *, struct tm6000_ir_poll_result *);
 
@@ -122,13 +122,14 @@ static void tm6000_ir_urb_received(struct urb *urb)
 
if (urb->status != 0)
printk(KERN_INFO "not ready\n");
-   else if (urb->actual_length > 0)
+   else if (urb->actual_length > 0) {
memcpy(ir->urb_data, urb->transfer_buffer, urb->actual_length);
 
-   dprintk("data %02x %02x %02x %02x\n", ir->urb_data[0],
-   ir->urb_data[1], ir->urb_data[2], ir->urb_data[3]);
+   dprintk("data %02x %02x %02x %02x\n", ir->urb_data[0],
+   ir->urb_data[1], ir->urb_data[2], ir->urb_data[3]);
 
-   ir->key = 1;
+   ir->key = 1;
+   }
 
rc = usb_submit_urb(urb, GFP_ATOMIC);
 }
@@ -140,30 +141,47 @@ static int default_polling_getkey(struct tm6000_IR *ir,
int rc;
u8 buf[2];
 
-   if (ir->wait && !&dev->int_in) {
-   poll_result->rc_data[0] = 0xff;
+   if (ir->wait && !&dev->int_in)
return 0;
-   }
 
if (&dev->int_in) {
-   poll_result->rc_data[0] = ir->urb_data[0];
-   poll_result->rc_data[1] = ir->urb_data[1];
+   if (ir->ir.ir_type == IR_TYPE_RC5)
+   poll_result->rc_data = ir->urb_data[0];
+   else
+   poll_result->rc_data = ir->urb_data[0] | 
ir->urb_data[1] << 8;
} else {
tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 0);
msleep(10);
tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 1);
msleep(10);
 
-   rc = tm6000_read_write_usb(dev, USB_DIR_IN | USB_TYPE_VENDOR |
-USB_RECIP_DEVICE, REQ_02_GET_IR_CODE, 0, 0, buf, 1);
+   if (ir->ir.ir_type == IR_TYPE_RC5) {
+   rc = tm6000_read_write_usb(dev, USB_DIR_IN |
+   USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+   REQ_02_GET_IR_CODE, 0, 0, buf, 1);
 
-   msleep(10);
+   msleep(10);
 
-   dprintk("read data=%02x\n", buf[0]);
-   if (rc < 0)
-   return rc;
+   dprintk("read data=%02x\n", buf[0]);
+   if (rc < 0)
+   return rc;
 
-   poll_result->rc_data[0] = buf[0];
+   poll_result->rc_data = buf[0];
+   } else {
+   rc = tm6000_read_write_usb(dev, USB_DIR_IN |
+   USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+   REQ_02_GET_IR_CODE, 0, 0, buf, 2);
+
+   msleep(10);
+
+   dprintk("read data=%04x\n", buf[0] | buf[1] << 8);
+   if (rc < 0)
+   return rc;
+
+   poll_result->rc_data = buf[0] | buf[1] << 8;
+   }
+   if ((poll_result->rc_data & 0x00ff) != 0xff)
+   ir->key = 1;
}
return 0;
 }
@@ -180,12 +198,11 @@ static void tm6000_ir_handle_key(struct tm6000_IR *ir)
return;
}
 
-   dprintk("ir->get_key result data=%02x %02x\n",
-   poll_result.rc_data[0], poll_result.rc_data[1]);
+   dprintk("ir->get_key result data=%04x\n", poll_result.rc_data);
 
-   if (poll_result.rc_data[0] != 0xff && ir->key == 1) {
+   if (ir->key) {
ir_input_keydown(ir->input->input_dev, &ir->ir,
-   poll_result.rc_data[0] | poll_result.rc_data[1] << 8);
+   (u32)poll_result.rc_dat

[git:v4l-utils/master] libv4l: update upside down table

2010-09-24 Thread Hans de Goede
This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-utils.git tree:

Subject: libv4l: update upside down table
Author:  Hans de Goede 
Date:Fri Sep 24 15:08:51 2010 +0200

Signed-off-by: Hans de Goede 

 lib/libv4lconvert/control/libv4lcontrol.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=5dd23169efbfe66a5364f03d84b3defc945b3223

diff --git a/lib/libv4lconvert/control/libv4lcontrol.c 
b/lib/libv4lconvert/control/libv4lcontrol.c
index 425b221..5a09bd9 100644
--- a/lib/libv4lconvert/control/libv4lcontrol.c
+++ b/lib/libv4lconvert/control/libv4lcontrol.c
@@ -342,6 +342,8 @@ static const struct v4lcontrol_flags_info 
v4lcontrol_flags[] = {
V4LCONTROL_HFLIPPED | V4LCONTROL_VFLIPPED },
{ 0x13d3, 0x5130, 0, "ASUSTeK Computer INC.", "K40AE",
V4LCONTROL_HFLIPPED | V4LCONTROL_VFLIPPED },
+   { 0x13d3, 0x5130, 0, "ASUSTeK Computer INC.", "K40AF",
+   V4LCONTROL_HFLIPPED | V4LCONTROL_VFLIPPED },
{ 0x13d3, 0x5130, 0, "ASUSTeK Computer INC.", "K50AF",
V4LCONTROL_HFLIPPED | V4LCONTROL_VFLIPPED },
{ 0x13d3, 0x5130, 0, "ASUSTeK Computer Inc.", "K50ID ",

___
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits