]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'v4l-dvb/master'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 00:16:14 +0000 (11:16 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 00:16:18 +0000 (11:16 +1100)
Conflicts:
drivers/media/pci/bt8xx/bttv-input.c
drivers/media/platform/Kconfig
drivers/staging/media/go7007/go7007-driver.c

1  2 
MAINTAINERS
drivers/media/pci/bt8xx/bttv-i2c.c
drivers/media/platform/Kconfig
drivers/staging/media/go7007/go7007-driver.c

diff --cc MAINTAINERS
Simple merge
index c63c643ed1f83360bb05586aa21ee003a4a8e4cc,b7c52dc8999c4f9acfb115f7fde26822dd3328a2..d43911deb617a97a78348bc5e7bdb5f6ee1bf265
@@@ -394,3 -394,11 +394,11 @@@ int init_bttv_i2c(struct bttv *btv
  
        return btv->i2c_rc;
  }
 -      if (0 != btv->i2c_rc)
 -              return 0;
+ int fini_bttv_i2c(struct bttv *btv)
+ {
 -      return i2c_del_adapter(&btv->c.i2c_adap);
++      if (btv->i2c_rc == 0)
++              i2c_del_adapter(&btv->c.i2c_adap);
++      return 0;
+ }
index a0639e77997357d96422568422e2ef28c12a2772,42c62aa33e1117a1e1591e989a12a418a557d254..077eeeb30c57f2b1236e066111e5d98981254689
@@@ -204,7 -204,7 +204,7 @@@ config VIDEO_SAMSUNG_EXYNOS_GS
  
  config VIDEO_SH_VEU
        tristate "SuperH VEU mem2mem video processing driver"
-       depends on VIDEO_DEV && VIDEO_V4L2 && GENERIC_HARDIRQS
 -      depends on VIDEO_DEV && VIDEO_V4L2 && HAS_DMA
++      depends on VIDEO_DEV && VIDEO_V4L2 && GENERIC_HARDIRQS && HAS_DMA
        select VIDEOBUF2_DMA_CONTIG
        select V4L2_MEM2MEM_DEV
        help
index 6f83c52a0b5204721f0c01e865cbfd9ef30a40a2,a5ca99d7c0b29bad2d13d392fa5ef881df541092..3640df0aa0c1faf6e819a1395d2c846da6ba0ca5
@@@ -201,13 -208,50 +208,47 @@@ static int init_i2c_module(struct i2c_a
  {
        struct go7007 *go = i2c_get_adapdata(adapter);
        struct v4l2_device *v4l2_dev = &go->v4l2_dev;
-       if (v4l2_i2c_new_subdev(v4l2_dev, adapter, type, addr, NULL))
+       struct v4l2_subdev *sd;
+       struct i2c_board_info info;
+       memset(&info, 0, sizeof(info));
+       strlcpy(info.type, i2c->type, sizeof(info.type));
+       info.addr = i2c->addr;
+       info.flags = i2c->flags;
+       sd = v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, NULL);
+       if (sd) {
+               if (i2c->is_video)
+                       go->sd_video = sd;
+               if (i2c->is_audio)
+                       go->sd_audio = sd;
                return 0;
 -              if (i2c_del_adapter(&go->i2c_adapter) == 0)
 -                      go->i2c_adapter_online = 0;
 -              else
 -                      v4l2_err(&go->v4l2_dev,
 -                              "error removing I2C adapter!\n");
+       }
+       printk(KERN_INFO "go7007: probing for module i2c:%s failed\n", i2c->type);
+       return -EINVAL;
+ }
+ /*
+  * Detach and unregister the encoder.  The go7007 struct won't be freed
+  * until v4l2 finishes releasing its resources and all associated fds are
+  * closed by applications.
+  */
+ static void go7007_remove(struct v4l2_device *v4l2_dev)
+ {
+       struct go7007 *go = container_of(v4l2_dev, struct go7007, v4l2_dev);
+       v4l2_device_unregister(v4l2_dev);
+       if (go->hpi_ops->release)
+               go->hpi_ops->release(go);
+       if (go->i2c_adapter_online) {
++              i2c_del_adapter(&go->i2c_adapter);
++              go->i2c_adapter_online = 0;
+       }
  
-       dev_info(&adapter->dev,
-                "go7007: probing for module i2c:%s failed\n", type);
-       return -1;
+       kfree(go->boot_fw);
+       go7007_v4l2_remove(go);
+       kfree(go);
  }
  
  /*