Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@woody.osdl.org>
Sun, 26 Nov 2006 17:42:40 +0000 (09:42 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sun, 26 Nov 2006 17:42:40 +0000 (09:42 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [XFRM] STATE: Fix to respond error to get operation if no matching entry exists.
  [NET]: Re-fix of doc-comment in sock.h
  [6PACK]: Masking bug in 6pack driver.
  [NET]: Fix kfifo_alloc() error check.
  [UDP]: Make udp_encap_rcv use pskb_may_pull
  [NETFILTER]: H.323 conntrack: fix crash with CONFIG_IP_NF_CT_ACCT

drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/frontends/tda10086.c
drivers/media/dvb/ttpci/budget.c
drivers/media/video/et61x251/et61x251_core.c
drivers/media/video/saa6588.c
drivers/media/video/saa7115.c
drivers/media/video/sn9c102/sn9c102_core.c

index 53304e6991ac61326fbec9001d362530f62bd8d9..a2ab2eebfc685322a640d3c920ddefd1531b1033 100644 (file)
@@ -348,7 +348,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
 
 static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 {
-       fe_status_t s;
+       fe_status_t s = 0;
        struct dvb_frontend_private *fepriv = fe->frontend_priv;
 
        /* if we've got no parameters, just keep idling */
index 7456b0b9976b0ebbacc8a61bf686101b14d05a13..4c27a2d90a38cf1e3f763a6535bd2d1113775720 100644 (file)
@@ -441,6 +441,10 @@ static int tda10086_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_pa
 
        dprintk ("%s\n", __FUNCTION__);
 
+       // check for invalid symbol rate
+       if (fe_params->u.qpsk.symbol_rate < 500000)
+               return -EINVAL;
+
        // calculate the updated frequency (note: we convert from Hz->kHz)
        tmp64 = tda10086_read_byte(state, 0x52);
        tmp64 |= (tda10086_read_byte(state, 0x51) << 8);
index e58f0391e9d1ac0386a707bfaf9373dcab261dfa..56f1c80defc63deead3ec65349f727408ace2e7f 100644 (file)
 #include "lnbp21.h"
 #include "bsru6.h"
 
+static int diseqc_method;
+module_param(diseqc_method, int, 0444);
+MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)");
+
 static void Set22K (struct budget *budget, int state)
 {
        struct saa7146_dev *dev=budget->dev;
@@ -382,6 +386,11 @@ static void frontend_init(struct budget *budget)
                if (budget->dvb_frontend) {
                        budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
                        budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
+                       if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) {
+                               budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
+                               budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
+                               budget->dvb_frontend->ops.set_tone = budget_set_tone;
+                       }
                        break;
                }
                break;
index f786ab11d2cd9b1a48cb0aff6bd70f85c19abd2f..86e353b26b53091c8deb0590ee18f272bead6d3a 100644 (file)
@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(struct et61x251_device* cam)
        video_set_drvdata(cam->v4ldev, NULL);
        video_unregister_device(cam->v4ldev);
 
-       usb_put_dev(cam->usbdev);
-
        mutex_unlock(&et61x251_sysfs_lock);
 
        kfree(cam->control_buffer);
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode* inode, struct file* filp)
 
        if (cam->state & DEV_DISCONNECTED) {
                et61x251_release_resources(cam);
+               usb_put_dev(cam->usbdev);
                mutex_unlock(&cam->dev_mutex);
                kfree(cam);
                return 0;
index a81285ca7d5bcbb98d54f8bb326536e064442815..7b9859c33018e41803be47f094626cd6b17409c2 100644 (file)
@@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588 *s, struct rds_command *a)
        if (rd_blocks > s->block_count)
                rd_blocks = s->block_count;
 
-       if (!rd_blocks)
+       if (!rd_blocks) {
+               spin_unlock_irqrestore(&s->lock, flags);
                return;
+       }
 
        for (i = 0; i < rd_blocks; i++) {
                if (block_to_user_buf(s, buf_ptr)) {
index c5719f7bd1acafbaee6f53c8553363c35f1b5bf2..f28398dd9d935d794d4c23582f9a43294f112517 100644 (file)
@@ -1464,8 +1464,6 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind)
        client->driver = &i2c_driver_saa711x;
        snprintf(client->name, sizeof(client->name) - 1, "saa7115");
 
-       v4l_dbg(1, debug, client, "detecting saa7115 client on address 0x%x\n", address << 1);
-
        for (i=0;i<0x0f;i++) {
                saa711x_write(client, 0, i);
                name[i] = (saa711x_read(client, 0) &0x0f) +'0';
@@ -1477,6 +1475,13 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind)
        saa711x_write(client, 0, 5);
        chip_id = saa711x_read(client, 0) & 0x0f;
 
+       /* Check whether this chip is part of the saa711x series */
+       if (memcmp(name, "1f711", 5)) {
+               v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n",
+                       address << 1, name);
+               return 0;
+       }
+
        snprintf(client->name, sizeof(client->name) - 1, "saa711%d",chip_id);
        v4l_info(client, "saa711%d found (%s) @ 0x%x (%s)\n", chip_id, name, address << 1, adapter->name);
 
index a4702d3c2aca4f295faa28dff8ca5c9c37bf49e1..42fb60d985b999d5b939609de79a5e87449e6878 100644 (file)
@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(struct sn9c102_device* cam)
        video_set_drvdata(cam->v4ldev, NULL);
        video_unregister_device(cam->v4ldev);
 
-       usb_put_dev(cam->usbdev);
-
        mutex_unlock(&sn9c102_sysfs_lock);
 
        kfree(cam->control_buffer);
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode* inode, struct file* filp)
 
        if (cam->state & DEV_DISCONNECTED) {
                sn9c102_release_resources(cam);
+               usb_put_dev(cam->usbdev);
                mutex_unlock(&cam->dev_mutex);
                kfree(cam);
                return 0;