linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lars-Peter Clausen <lars@metafoo.de>,
	Wolfram Sang <wsa@the-dreams.de>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: linux-next: manual merge of the v4l-dvb tree with the 2c tree
Date: Wed, 3 Apr 2013 12:10:16 +1100	[thread overview]
Message-ID: <20130403121016.f86c8b90472878f9918706c2@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]

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@canb.auug.org.au

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 #2: Type: application/pgp-signature, Size: 836 bytes --]

                 reply	other threads:[~2013-04-03  1:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130403121016.f86c8b90472878f9918706c2@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=hans.verkuil@cisco.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).