]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[media] go7007: update the README, fix checkpatch warnings
authorHans Verkuil <hans.verkuil@cisco.com>
Thu, 17 Jul 2014 23:40:20 +0000 (20:40 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 22 Jul 2014 03:07:01 +0000 (00:07 -0300)
This prepares the driver for moving out of staging.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/staging/media/go7007/README
drivers/staging/media/go7007/go7007-driver.c
drivers/staging/media/go7007/go7007-fw.c
drivers/staging/media/go7007/go7007-i2c.c
drivers/staging/media/go7007/go7007-loader.c
drivers/staging/media/go7007/go7007-priv.h
drivers/staging/media/go7007/go7007-usb.c
drivers/staging/media/go7007/go7007-v4l2.c
drivers/staging/media/go7007/s2250-board.c
drivers/staging/media/go7007/saa7134-go7007.c
drivers/staging/media/go7007/snd-go7007.c

index 3af0d9062811aed796e62ace16a541906d548d2a..34516ea3b9c5240b39c57f661c8159dc3762a68c 100644 (file)
@@ -1,5 +1,4 @@
 Todo:
-       - create an API for motion detection
        - let s2250-board use i2c subdevs as well instead of hardcoding
          support for the i2c devices.
        - when the driver is moved out of staging, support for saa7134-go7007
index c200601cea99c21fd4b6225d4d5c40c9d6424080..95cffb771a62e91c23e062276619f44ce183f688 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/module.h>
@@ -225,7 +221,7 @@ static int init_i2c_module(struct i2c_adapter *adapter, const struct go_i2c *con
                return 0;
        }
 
-       printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", i2c->type);
+       pr_info("go7007: probing for module i2c:%s failed\n", i2c->type);
        return -EINVAL;
 }
 
index f60640b2c81af9a31160ca30a6967b4c4c7fb6c9..5f4c9b9e899aae784343f8cb93411cad2bc7d7c5 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 /*
index 4cf4c0d6508536c17dc5489ac4cd93ab943bd036..55addfa855d4d39e252087b16db850a6cca76cf7 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/module.h>
index 491d0e697f5ab49150a25c80ffedef394bf7eea6..042f78a3128302f6615af845d6282f4b76d979e3 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/module.h>
index a8aefedfc8433c0bd053551a9b9a885c38b7118f..2251c3f99d1db32ccc2d3362e2a745697eba2b4f 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 /*
index 2f62be905cd1ddd5f92308b0f958bc1ed6daa997..ece27ece81158f0c17b1125f3a8e27616082a45b 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
index 4bf143f92071a4c7143b8dc5d3e2fb52c2d3390e..ec799b4d88be41e87b55d319b60d08ab7b179d91 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/module.h>
index eaa2b0990a1b0a77ed2c6f8943b8b742647df7dc..bb846680bcd479e4d94bc74f80b8fbfa7d9496b9 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/module.h>
@@ -573,11 +569,12 @@ static int s2250_probe(struct i2c_client *client,
        if (mutex_lock_interruptible(&usb->i2c_lock) == 0) {
                data = kzalloc(16, GFP_KERNEL);
                if (data != NULL) {
-                       int rc;
-                       rc = go7007_usb_vendor_request(go, 0x41, 0, 0,
+                       int rc = go7007_usb_vendor_request(go, 0x41, 0, 0,
                                                       data, 16, 1);
+
                        if (rc > 0) {
                                u8 mask;
+
                                data[0] = 0;
                                mask = 1<<5;
                                data[0] &= ~mask;
index df5cb1c87be5ab32507aaa0695d9ba6a605a8105..b137432fa0e4d4695bfccbc3c6304cb81f4cb78c 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/module.h>
@@ -167,7 +163,7 @@ static int saa7134_go7007_interface_reset(struct go7007 *go)
        saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
 
        status = saa_readb(SAA7134_GPIO_GPSTATUS2);
-       /*printk(KERN_DEBUG "status is %s\n", status & 0x40 ? "OK" : "not OK"); */
+       /*pr_debug("status is %s\n", status & 0x40 ? "OK" : "not OK"); */
 
        /* enter command mode...(?) */
        saa_writeb(SAA7134_GPIO_GPSTATUS2, GPIO_COMMAND_REQ1);
@@ -177,14 +173,13 @@ static int saa7134_go7007_interface_reset(struct go7007 *go)
                saa_clearb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
                saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
                status = saa_readb(SAA7134_GPIO_GPSTATUS2);
-               /*printk(KERN_INFO "gpio is %08x\n", saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2)); */
+               /*pr_info("gpio is %08x\n", saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2)); */
        } while (--count > 0);
 
        /* Wait for an interrupt to indicate successful hardware reset */
        if (go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
                        (intr_val & ~0x1) != 0x55aa) {
-               printk(KERN_ERR
-                       "saa7134-go7007: unable to reset the GO7007\n");
+               pr_err("saa7134-go7007: unable to reset the GO7007\n");
                return -1;
        }
        return 0;
@@ -198,8 +193,7 @@ static int saa7134_go7007_write_interrupt(struct go7007 *go, int addr, int data)
        u16 status_reg;
 
 #ifdef GO7007_HPI_DEBUG
-       printk(KERN_DEBUG
-               "saa7134-go7007: WriteInterrupt: %04x %04x\n", addr, data);
+       pr_debug("saa7134-go7007: WriteInterrupt: %04x %04x\n", addr, data);
 #endif
 
        for (i = 0; i < 100; ++i) {
@@ -209,8 +203,7 @@ static int saa7134_go7007_write_interrupt(struct go7007 *go, int addr, int data)
                msleep(10);
        }
        if (i == 100) {
-               printk(KERN_ERR
-                       "saa7134-go7007: device is hung, status reg = 0x%04x\n",
+               pr_err("saa7134-go7007: device is hung, status reg = 0x%04x\n",
                        status_reg);
                return -1;
        }
@@ -230,7 +223,7 @@ static int saa7134_go7007_read_interrupt(struct go7007 *go)
        gpio_read(dev, HPI_ADDR_INTR_RET_VALUE, &go->interrupt_value);
        gpio_read(dev, HPI_ADDR_INTR_RET_DATA, &go->interrupt_data);
 #ifdef GO7007_HPI_DEBUG
-       printk(KERN_DEBUG "saa7134-go7007: ReadInterrupt: %04x %04x\n",
+       pr_debug("saa7134-go7007: ReadInterrupt: %04x %04x\n",
                        go->interrupt_value, go->interrupt_data);
 #endif
        return 0;
@@ -245,7 +238,7 @@ static void saa7134_go7007_irq_ts_done(struct saa7134_dev *dev,
        if (!vb2_is_streaming(&go->vidq))
                return;
        if (0 != (status & 0x000f0000))
-               printk(KERN_DEBUG "saa7134-go7007: irq: lost %ld\n",
+               pr_debug("saa7134-go7007: irq: lost %ld\n",
                                (status >> 16) & 0x0f);
        if (status & 0x100000) {
                dma_sync_single_for_cpu(&dev->pci->dev,
@@ -355,8 +348,7 @@ static int saa7134_go7007_send_firmware(struct go7007 *go, u8 *data, int len)
        int i;
 
 #ifdef GO7007_HPI_DEBUG
-       printk(KERN_DEBUG "saa7134-go7007: DownloadBuffer "
-                       "sending %d bytes\n", len);
+       pr_debug("saa7134-go7007: DownloadBuffer sending %d bytes\n", len);
 #endif
 
        while (len > 0) {
@@ -378,8 +370,8 @@ static int saa7134_go7007_send_firmware(struct go7007 *go, u8 *data, int len)
                                break;
                }
                if (i == 100) {
-                       printk(KERN_ERR "saa7134-go7007: device is hung, "
-                                       "status reg = 0x%04x\n", status_reg);
+                       pr_err("saa7134-go7007: device is hung, status reg = 0x%04x\n",
+                                       status_reg);
                        return -1;
                }
        }
@@ -416,6 +408,7 @@ static int saa7134_go7007_s_ctrl(struct v4l2_subdev *sd,
 {
        struct saa7134_go7007 *saa = to_state(sd);
        struct saa7134_dev *dev = saa->dev;
+
        return saa7134_s_ctrl_internal(dev, NULL, ctrl);
 }
 
@@ -424,6 +417,7 @@ static int saa7134_go7007_g_ctrl(struct v4l2_subdev *sd,
 {
        struct saa7134_go7007 *saa = to_state(sd);
        struct saa7134_dev *dev = saa->dev;
+
        return saa7134_g_ctrl_internal(dev, NULL, ctrl);
 }
 
@@ -455,7 +449,7 @@ static int saa7134_go7007_init(struct saa7134_dev *dev)
        struct saa7134_go7007 *saa;
        struct v4l2_subdev *sd;
 
-       printk(KERN_DEBUG "saa7134-go7007: probing new SAA713X board\n");
+       pr_debug("saa7134-go7007: probing new SAA713X board\n");
 
        go = go7007_alloc(&board_voyager, &dev->pci->dev);
        if (go == NULL)
@@ -500,7 +494,7 @@ static int saa7134_go7007_init(struct saa7134_dev *dev)
 
        /* Register the subdevice interface with the go7007 device */
        if (v4l2_device_register_subdev(&go->v4l2_dev, sd) < 0)
-               printk(KERN_INFO "saa7134-go7007: register subdev failed\n");
+               pr_info("saa7134-go7007: register subdev failed\n");
 
        dev->empress_dev = &go->vdev;
 
index 9eb2a20ae40a97916721599bbd80bfc04190e795..d22d7d57467279c032feec8011d59ce7672bf9af 100644 (file)
@@ -9,10 +9,6 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
  */
 
 #include <linux/kernel.h>