linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus Walleij <linus.walleij@linaro.org>,
	Wolfram Sang <wsa@the-dreams.de>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Phil Reid <preid@electromag.com.au>
Subject: linux-next: manual merge of the gpio tree with the i2c tree
Date: Tue, 27 Sep 2016 15:02:12 +1000	[thread overview]
Message-ID: <20160927150212.7fa33016@canb.auug.org.au> (raw)

Hi Linus,

Today's linux-next merge of the gpio tree got a conflict in:

  drivers/gpio/gpio-pca953x.c

between commit:

  6212e1d6ed40 ("gpio: pca953x: variable 'id' was used twice")

from the i2c tree and commit:

  e23efa311110 ("gpio: pca954x: Add vcc regulator and enable it")

from the gpio tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpio/gpio-pca953x.c
index 018f39cc19c8,5d059866d17a..000000000000
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@@ -765,29 -759,41 +759,43 @@@ static int pca953x_probe(struct i2c_cli
  
  	chip->client = client;
  
+ 	reg = devm_regulator_get(&client->dev, "vcc");
+ 	if (IS_ERR(reg)) {
+ 		ret = PTR_ERR(reg);
+ 		if (ret != -EPROBE_DEFER)
+ 			dev_err(&client->dev, "reg get err: %d\n", ret);
+ 		return ret;
+ 	}
+ 	ret = regulator_enable(reg);
+ 	if (ret) {
+ 		dev_err(&client->dev, "reg en err: %d\n", ret);
+ 		return ret;
+ 	}
+ 	chip->regulator = reg;
+ 
 -	if (id) {
 -		chip->driver_data = id->driver_data;
 +	if (i2c_id) {
 +		chip->driver_data = i2c_id->driver_data;
  	} else {
 -		const struct acpi_device_id *id;
 +		const struct acpi_device_id *acpi_id;
  		const struct of_device_id *match;
  
  		match = of_match_device(pca953x_dt_ids, &client->dev);
  		if (match) {
  			chip->driver_data = (int)(uintptr_t)match->data;
  		} else {
 -			id = acpi_match_device(pca953x_acpi_ids, &client->dev);
 -			if (!id) {
 +			acpi_id = acpi_match_device(pca953x_acpi_ids, &client->dev);
- 			if (!acpi_id)
- 				return -ENODEV;
++			if (!acpi_id) {
+ 				ret = -ENODEV;
+ 				goto err_exit;
+ 			}
  
 -			chip->driver_data = id->driver_data;
 +			chip->driver_data = acpi_id->driver_data;
  		}
  	}
  
- 	chip->chip_type = PCA_CHIP_TYPE(chip->driver_data);
- 
  	mutex_init(&chip->i2c_lock);
 +	lockdep_set_subclass(&chip->i2c_lock,
 +			     i2c_adapter_depth(client->adapter));
  
  	/* initialize cached registers from their original values.
  	 * we can't share this chip with another i2c master.

                 reply	other threads:[~2016-09-27  5:02 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=20160927150212.7fa33016@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --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).