All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregkh@suse.de (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH] i2c: Rework client usage count, 1 of 3
Date: Fri, 06 Jan 2006 22:07:35 +0000	[thread overview]
Message-ID: <11365852551513@kroah.com> (raw)
In-Reply-To: <11365852552960@kroah.com>

[PATCH] i2c: Rework client usage count, 1 of 3

No i2c client uses the I2C_CLIENT_ALLOW_MULTIPLE_USE flag, drop it.

Signed-off-by: Jean Delvare <khali at linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

---
commit cb748fb20186d4b345c68a7f580429f379fdd268
tree 6c8f4f0937941bb4ee56ed72ba0b7f60562f1e1d
parent 5d7b851dcced3611e4a4432308618b1ed1a9fc31
author Jean Delvare <khali at linux-fr.org> Sat, 26 Nov 2005 20:58:35 +0100
committer Greg Kroah-Hartman <gregkh at suse.de> Thu, 05 Jan 2006 22:16:22 -0800

 drivers/i2c/i2c-core.c |    4 +---
 include/linux/i2c.h    |    2 --
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index ad68ac0..2f0bc95 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -500,9 +500,7 @@ int i2c_use_client(struct i2c_client *cl
 		return ret;
 
 	if (client->flags & I2C_CLIENT_ALLOW_USE) {
-		if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE)
-			client->usage_count++;
-		else if (client->usage_count > 0) 
+		if (client->usage_count > 0)
 			goto busy;
 		else 
 			client->usage_count++;
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 3c16a8f..4487c51 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -251,8 +251,6 @@ static inline void i2c_set_adapdata (str
 
 /*flags for the client struct: */
 #define I2C_CLIENT_ALLOW_USE		0x01	/* Client allows access */
-#define I2C_CLIENT_ALLOW_MULTIPLE_USE 	0x02  	/* Allow multiple access-locks */
-						/* on an i2c_client */
 #define I2C_CLIENT_PEC  0x04			/* Use Packet Error Checking */
 #define I2C_CLIENT_TEN	0x10			/* we have a ten bit chip address	*/
 						/* Must equal I2C_M_TEN below */



  reply	other threads:[~2006-01-06 22:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06 22:07 [lm-sensors] [PATCH] i2c: Rework client usage count, 3 of 3 Greg KH
2006-01-06 22:07 ` Greg KH [this message]
2006-01-06 22:07 ` [lm-sensors] [PATCH] i2c: Rework client usage count, 2 " Greg KH

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=11365852551513@kroah.com \
    --to=gregkh@suse.de \
    --cc=lm-sensors@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.