linux-next: manual merge of the v4l-dvb tree with the 2c tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mauro,

Today's linux-next merge of the v4l-dvb tree got a conflict in
drivers/staging/media/go7007/go7007-driver.c between commit bf51a8c5e0b6
("i2c: Ignore return value of i2c_del_adapter()") from the i2c tree and
commit d5d3a7cc127d ("[media] go7007: fix unregister/disconnect
handling") from the v4l-dvb tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/staging/media/go7007/go7007-driver.c
index 6f83c52,a5ca99d..0000000
--- a/drivers/staging/media/go7007/go7007-driver.c
+++ b/drivers/staging/media/go7007/go7007-driver.c
@@@ -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;
+ 	}
+ 
+ 	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) {
 -		if (i2c_del_adapter(&go->i2c_adapter) == 0)
 -			go->i2c_adapter_online = 0;
 -		else
 -			v4l2_err(&go->v4l2_dev,
 -				"error removing I2C adapter!\n");
++		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);
  }
  
  /*

Attachment: pgpQFtMBk54UL.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux