linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BK PATCH] W1 patches for 2.6.11
@ 2005-03-04 20:39 Greg KH
  2005-03-04 20:39 ` [PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible() Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel

Hi,

Here are some W1 driver patches against the latest 2.6.11 tree.  These
have all been in the past few -mm releases.

Please pull from:
	bk://kernel.bkbits.net/gregkh/linux/w1-2.6

thanks,

greg k-h

 drivers/w1/dscore.c    |   27 ++++++++++++++-------------
 drivers/w1/dscore.h    |    3 ---
 drivers/w1/matrox_w1.c |    2 +-
 drivers/w1/w1.c        |   41 +++++++++++++++--------------------------
 drivers/w1/w1.h        |    1 -
 drivers/w1/w1_family.c |    4 ++--
 drivers/w1/w1_int.c    |    4 ----
 drivers/w1/w1_therm.c  |   12 ++++++------
 8 files changed, 38 insertions(+), 56 deletions(-)
-----


Christophe Lucas:
  o drivers/w1/*: convert to pci_register_driver

Evgeniy Polyakov:
  o w1: get rid of the potential problems with atomic operations
  o w1: replace obsoleted *sleep_on*
  o w1: Core cleanup 1/2
  o w1: dscore cleanups. 2/2

Greg Kroah-Hartman:
  o w1: fix some compiler warnings generated by the last "static" patch

Nishanth Aravamudan:
  o w1/w1_therm: replace schedule_timeout() with msleep_interruptible()


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] w1: Core cleanup 1/2
  2005-03-04 20:39   ` [PATCH] w1: dscore cleanups. 2/2 Greg KH
@ 2005-03-04 20:39     ` Greg KH
  2005-03-04 20:39       ` [PATCH] w1: fix some compiler warnings generated by the last "static" patch Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: johnpol

ChangeSet 1.2082, 2005/03/02 16:58:52-08:00, johnpol@2ka.mipt.ru

[PATCH] w1: Core cleanup 1/2

Trivial cleanups, mostly static/non static, removed unneded exports.
It fuzzes a bit, sorry, patch is quite old.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/w1/w1.c        |   23 ++++++++++-------------
 drivers/w1/w1_family.c |    2 --
 drivers/w1/w1_int.c    |    3 ---
 3 files changed, 10 insertions(+), 18 deletions(-)


diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c
--- a/drivers/w1/w1.c	2005-03-04 12:38:12 -08:00
+++ b/drivers/w1/w1.c	2005-03-04 12:38:12 -08:00
@@ -19,8 +19,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
-#include <asm/atomic.h>
-
 #include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -33,6 +31,8 @@
 #include <linux/slab.h>
 #include <linux/sched.h>
 
+#include <asm/atomic.h>
+
 #include "w1.h"
 #include "w1_io.h"
 #include "w1_log.h"
@@ -100,7 +100,7 @@
 	return sprintf(buf, "No family registered.\n");
 }
 
-struct bus_type w1_bus_type = {
+static struct bus_type w1_bus_type = {
 	.name = "w1",
 	.match = w1_master_match,
 };
@@ -138,7 +138,7 @@
 	.show = &w1_default_read_name,
 };
 
-ssize_t w1_master_attribute_show_name(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_name(struct device *dev, char *buf)
 {
 	struct w1_master *md = container_of (dev, struct w1_master, dev);
 	ssize_t count;
@@ -153,7 +153,7 @@
 	return count;
 }
 
-ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_pointer(struct device *dev, char *buf)
 {
 	struct w1_master *md = container_of(dev, struct w1_master, dev);
 	ssize_t count;
@@ -167,14 +167,14 @@
 	return count;
 }
 
-ssize_t w1_master_attribute_show_timeout(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_timeout(struct device *dev, char *buf)
 {
 	ssize_t count;
 	count = sprintf(buf, "%d\n", w1_timeout);
 	return count;
 }
 
-ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, char *buf)
 {
 	struct w1_master *md = container_of(dev, struct w1_master, dev);
 	ssize_t count;
@@ -188,7 +188,7 @@
 	return count;
 }
 
-ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_attempts(struct device *dev, char *buf)
 {
 	struct w1_master *md = container_of(dev, struct w1_master, dev);
 	ssize_t count;
@@ -202,7 +202,7 @@
 	return count;
 }
 
-ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_slave_count(struct device *dev, char *buf)
 {
 	struct w1_master *md = container_of(dev, struct w1_master, dev);
 	ssize_t count;
@@ -216,7 +216,7 @@
 	return count;
 }
 
-ssize_t w1_master_attribute_show_slaves(struct device *dev, char *buf)
+static ssize_t w1_master_attribute_show_slaves(struct device *dev, char *buf)
 
 {
 	struct w1_master *md = container_of(dev, struct w1_master, dev);
@@ -839,6 +839,3 @@
 
 module_init(w1_init);
 module_exit(w1_fini);
-
-EXPORT_SYMBOL(w1_create_master_attributes);
-EXPORT_SYMBOL(w1_destroy_master_attributes);
diff -Nru a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c
--- a/drivers/w1/w1_family.c	2005-03-04 12:38:12 -08:00
+++ b/drivers/w1/w1_family.c	2005-03-04 12:38:12 -08:00
@@ -143,8 +143,6 @@
 
 EXPORT_SYMBOL(w1_family_get);
 EXPORT_SYMBOL(w1_family_put);
-EXPORT_SYMBOL(__w1_family_get);
-EXPORT_SYMBOL(__w1_family_put);
 EXPORT_SYMBOL(w1_family_registered);
 EXPORT_SYMBOL(w1_unregister_family);
 EXPORT_SYMBOL(w1_register_family);
diff -Nru a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
--- a/drivers/w1/w1_int.c	2005-03-04 12:38:12 -08:00
+++ b/drivers/w1/w1_int.c	2005-03-04 12:38:12 -08:00
@@ -217,8 +217,5 @@
 	__w1_remove_master_device(dev);
 }
 
-EXPORT_SYMBOL(w1_alloc_dev);
-EXPORT_SYMBOL(w1_free_dev);
 EXPORT_SYMBOL(w1_add_master_device);
 EXPORT_SYMBOL(w1_remove_master_device);
-EXPORT_SYMBOL(__w1_remove_master_device);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible()
  2005-03-04 20:39 [BK PATCH] W1 patches for 2.6.11 Greg KH
@ 2005-03-04 20:39 ` Greg KH
  2005-03-04 20:39   ` [PATCH] w1: dscore cleanups. 2/2 Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: nacc

ChangeSet 1.2080, 2005/03/02 16:58:20-08:00, nacc@us.ibm.com

[PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible()

Description: Use msleep_interruptible() instead of schedule_timeout() to
guarantee the task delays as expected. Changed tm to an int, as it now is in
terms of msecs, not jiffies.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/w1/w1_therm.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)


diff -Nru a/drivers/w1/w1_therm.c b/drivers/w1/w1_therm.c
--- a/drivers/w1/w1_therm.c	2005-03-04 12:38:25 -08:00
+++ b/drivers/w1/w1_therm.c	2005-03-04 12:38:25 -08:00
@@ -26,6 +26,7 @@
 #include <linux/moduleparam.h>
 #include <linux/device.h>
 #include <linux/types.h>
+#include <linux/delay.h>
 
 #include "w1.h"
 #include "w1_io.h"
@@ -128,7 +129,7 @@
 		if (!w1_reset_bus (dev)) {
 			int count = 0;
 			u8 match[9] = {W1_MATCH_ROM, };
-			unsigned long tm;
+			unsigned int tm = 750;
 
 			memcpy(&match[1], (u64 *) & sl->reg_num, 8);
 			
@@ -136,11 +137,8 @@
 
 			w1_write_8(dev, W1_CONVERT_TEMP);
 
-			tm = jiffies + msecs_to_jiffies(750);
-			while(time_before(jiffies, tm)) {
-				set_current_state(TASK_INTERRUPTIBLE);
-				schedule_timeout(tm-jiffies);
-
+			while (tm) {
+				tm = msleep_interruptible(tm);
 				if (signal_pending(current))
 					flush_signals(current);
 			}


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] w1: fix some compiler warnings generated by the last "static" patch.
  2005-03-04 20:39     ` [PATCH] w1: Core cleanup 1/2 Greg KH
@ 2005-03-04 20:39       ` Greg KH
  2005-03-04 20:39         ` [PATCH] w1: replace obsoleted *sleep_on* Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: greg

ChangeSet 1.2083, 2005/03/02 16:59:08-08:00, greg@kroah.com

[PATCH] w1: fix some compiler warnings generated by the last "static" patch.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/w1/dscore.c |    3 ---
 drivers/w1/dscore.h |    3 ---
 2 files changed, 6 deletions(-)


diff -Nru a/drivers/w1/dscore.c b/drivers/w1/dscore.c
--- a/drivers/w1/dscore.c	2005-03-04 12:38:05 -08:00
+++ b/drivers/w1/dscore.c	2005-03-04 12:38:05 -08:00
@@ -45,9 +45,6 @@
 int ds_reset(struct ds_device *, struct ds_status *);
 int ds_detect(struct ds_device *, struct ds_status *);
 int ds_stop_pulse(struct ds_device *, int);
-int ds_send_data(struct ds_device *, unsigned char *, int);
-int ds_recv_data(struct ds_device *, unsigned char *, int);
-int ds_recv_status(struct ds_device *, struct ds_status *);
 struct ds_device * ds_get_device(void);
 void ds_put_device(struct ds_device *);
 
diff -Nru a/drivers/w1/dscore.h b/drivers/w1/dscore.h
--- a/drivers/w1/dscore.h	2005-03-04 12:38:05 -08:00
+++ b/drivers/w1/dscore.h	2005-03-04 12:38:05 -08:00
@@ -161,9 +161,6 @@
 int ds_reset(struct ds_device *, struct ds_status *);
 int ds_detect(struct ds_device *, struct ds_status *);
 int ds_stop_pulse(struct ds_device *, int);
-int ds_send_data(struct ds_device *, unsigned char *, int);
-int ds_recv_data(struct ds_device *, unsigned char *, int);
-int ds_recv_status(struct ds_device *, struct ds_status *);
 struct ds_device * ds_get_device(void);
 void ds_put_device(struct ds_device *);
 int ds_write_block(struct ds_device *, u8 *, int);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] w1: dscore cleanups. 2/2
  2005-03-04 20:39 ` [PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible() Greg KH
@ 2005-03-04 20:39   ` Greg KH
  2005-03-04 20:39     ` [PATCH] w1: Core cleanup 1/2 Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: johnpol

ChangeSet 1.2081, 2005/03/02 16:58:36-08:00, johnpol@2ka.mipt.ru

[PATCH] w1: dscore cleanups. 2/2

Trivial cleanups, mostly static/non static, removed unneded exports.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/w1/dscore.c |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)


diff -Nru a/drivers/w1/dscore.c b/drivers/w1/dscore.c
--- a/drivers/w1/dscore.c	2005-03-04 12:38:18 -08:00
+++ b/drivers/w1/dscore.c	2005-03-04 12:38:18 -08:00
@@ -148,7 +148,7 @@
 	return count;
 }
 
-int ds_recv_status(struct ds_device *dev, struct ds_status *st)
+static int ds_recv_status(struct ds_device *dev, struct ds_status *st)
 {
 	unsigned char buf[64];
 	int count, err = 0, i;
@@ -206,7 +206,7 @@
 	return err;
 }
 
-int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size)
+static int ds_recv_data(struct ds_device *dev, unsigned char *buf, int size)
 {
 	int count, err;
 	struct ds_status st;
@@ -234,7 +234,7 @@
 	return count;
 }
 
-int ds_send_data(struct ds_device *dev, unsigned char *buf, int len)
+static int ds_send_data(struct ds_device *dev, unsigned char *buf, int len)
 {
 	int count, err;
 	
@@ -774,15 +774,19 @@
 EXPORT_SYMBOL(ds_write_byte);
 EXPORT_SYMBOL(ds_write_bit);
 EXPORT_SYMBOL(ds_write_block);
+EXPORT_SYMBOL(ds_reset);
+EXPORT_SYMBOL(ds_get_device);
+EXPORT_SYMBOL(ds_put_device);
+
+/*
+ * This functions can be used for EEPROM programming, 
+ * when driver will be included into mainline this will 
+ * require uncommenting.
+ */
+#if 0
 EXPORT_SYMBOL(ds_start_pulse);
 EXPORT_SYMBOL(ds_set_speed);
-EXPORT_SYMBOL(ds_reset);
 EXPORT_SYMBOL(ds_detect);
 EXPORT_SYMBOL(ds_stop_pulse);
-EXPORT_SYMBOL(ds_send_data);
-EXPORT_SYMBOL(ds_recv_data);
-EXPORT_SYMBOL(ds_recv_status);
 EXPORT_SYMBOL(ds_search);
-EXPORT_SYMBOL(ds_get_device);
-EXPORT_SYMBOL(ds_put_device);
-
+#endif


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] drivers/w1/*: convert to pci_register_driver
  2005-03-04 20:39           ` [PATCH] w1: get rid of the potential problems with atomic operations Greg KH
@ 2005-03-04 20:39             ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: c.lucas

ChangeSet 1.2086, 2005/03/02 16:59:57-08:00, c.lucas@ifrance.com

[PATCH] drivers/w1/*: convert to pci_register_driver

convert from pci_module_init to pci_register_driver
(from:http://kerneljanitors.org/TODO).

Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


 drivers/w1/matrox_w1.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/w1/matrox_w1.c b/drivers/w1/matrox_w1.c
--- a/drivers/w1/matrox_w1.c	2005-03-04 12:37:44 -08:00
+++ b/drivers/w1/matrox_w1.c	2005-03-04 12:37:44 -08:00
@@ -235,7 +235,7 @@
 
 static int __init matrox_w1_init(void)
 {
-	return pci_module_init(&matrox_w1_pci_driver);
+	return pci_register_driver(&matrox_w1_pci_driver);
 }
 
 static void __exit matrox_w1_fini(void)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] w1: replace obsoleted *sleep_on*
  2005-03-04 20:39       ` [PATCH] w1: fix some compiler warnings generated by the last "static" patch Greg KH
@ 2005-03-04 20:39         ` Greg KH
  2005-03-04 20:39           ` [PATCH] w1: get rid of the potential problems with atomic operations Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: johnpol

ChangeSet 1.2084, 2005/03/02 16:59:25-08:00, johnpol@2ka.mipt.ru

[PATCH] w1: replace obsoleted *sleep_on*

Remove obsoleded *sleep_on*.

Since they are used only to wait for a given flags and awakening
only happens on signals, we can just replace them with
msleep_interruptible.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


 drivers/w1/w1.c     |   18 +++++-------------
 drivers/w1/w1.h     |    1 -
 drivers/w1/w1_int.c |    1 -
 3 files changed, 5 insertions(+), 15 deletions(-)


diff -Nru a/drivers/w1/w1.c b/drivers/w1/w1.c
--- a/drivers/w1/w1.c	2005-03-04 12:37:58 -08:00
+++ b/drivers/w1/w1.c	2005-03-04 12:37:58 -08:00
@@ -58,7 +58,6 @@
 static pid_t control_thread;
 static int control_needs_exit;
 static DECLARE_COMPLETION(w1_control_complete);
-static DECLARE_WAIT_QUEUE_HEAD(w1_control_wait);
 
 static int w1_master_match(struct device *dev, struct device_driver *drv)
 {
@@ -649,7 +648,7 @@
 	struct w1_slave *sl;
 	struct w1_master *dev;
 	struct list_head *ent, *ment, *n, *mn;
-	int err, have_to_wait = 0, timeout;
+	int err, have_to_wait = 0;
 
 	daemonize("w1_control");
 	allow_signal(SIGTERM);
@@ -657,11 +656,8 @@
 	while (!control_needs_exit || have_to_wait) {
 		have_to_wait = 0;
 
-		timeout = w1_timeout*HZ;
-		do {
-			timeout = interruptible_sleep_on_timeout(&w1_control_wait, timeout);
-			try_to_freeze(PF_FREEZE);
-		} while (!signal_pending(current) && (timeout > 0));
+		try_to_freeze(PF_FREEZE);
+		msleep_interruptible(w1_timeout * 1000);
 
 		if (signal_pending(current))
 			flush_signals(current);
@@ -721,7 +717,6 @@
 int w1_process(void *data)
 {
 	struct w1_master *dev = (struct w1_master *) data;
-	unsigned long timeout;
 	struct list_head *ent, *n;
 	struct w1_slave *sl;
 
@@ -729,11 +724,8 @@
 	allow_signal(SIGTERM);
 
 	while (!dev->need_exit) {
-		timeout = w1_timeout*HZ;
-		do {
-			timeout = interruptible_sleep_on_timeout(&dev->kwait, timeout);
-			try_to_freeze(PF_FREEZE);
-		} while (!signal_pending(current) && (timeout > 0));
+		try_to_freeze(PF_FREEZE);
+		msleep_interruptible(w1_timeout * 1000);
 
 		if (signal_pending(current))
 			flush_signals(current);
diff -Nru a/drivers/w1/w1.h b/drivers/w1/w1.h
--- a/drivers/w1/w1.h	2005-03-04 12:37:58 -08:00
+++ b/drivers/w1/w1.h	2005-03-04 12:37:58 -08:00
@@ -115,7 +115,6 @@
 
 	int			need_exit;
 	pid_t			kpid;
-	wait_queue_head_t 	kwait;
 	struct semaphore 	mutex;
 
 	struct device_driver	*driver;
diff -Nru a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
--- a/drivers/w1/w1_int.c	2005-03-04 12:37:58 -08:00
+++ b/drivers/w1/w1_int.c	2005-03-04 12:37:58 -08:00
@@ -74,7 +74,6 @@
 	INIT_LIST_HEAD(&dev->slist);
 	init_MUTEX(&dev->mutex);
 
-	init_waitqueue_head(&dev->kwait);
 	init_completion(&dev->dev_released);
 	init_completion(&dev->dev_exited);
 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH] w1: get rid of the potential problems with atomic operations.
  2005-03-04 20:39         ` [PATCH] w1: replace obsoleted *sleep_on* Greg KH
@ 2005-03-04 20:39           ` Greg KH
  2005-03-04 20:39             ` [PATCH] drivers/w1/*: convert to pci_register_driver Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2005-03-04 20:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: johnpol

ChangeSet 1.2085, 2005/03/02 16:59:41-08:00, johnpol@2ka.mipt.ru

[PATCH] w1: get rid of the potential problems with atomic operations.

Get rid of the potential problems with atomic operations.

According to upcoming atomic_ops.txt by David Miller and Anton Blanchard
some archs may reoder atomic operations with nonatomic, since
the former are always visible but the latter are not, this can lead
to unpredicted behaviour.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


 drivers/w1/w1_family.c |    2 ++
 drivers/w1/w1_therm.c  |    2 ++
 2 files changed, 4 insertions(+)


diff -Nru a/drivers/w1/w1_family.c b/drivers/w1/w1_family.c
--- a/drivers/w1/w1_family.c	2005-03-04 12:37:51 -08:00
+++ b/drivers/w1/w1_family.c	2005-03-04 12:37:51 -08:00
@@ -138,7 +138,9 @@
 
 void __w1_family_get(struct w1_family *f)
 {
+	smp_mb__before_atomic_inc();
 	atomic_inc(&f->refcnt);
+	smp_mb__after_atomic_inc();
 }
 
 EXPORT_SYMBOL(w1_family_get);
diff -Nru a/drivers/w1/w1_therm.c b/drivers/w1/w1_therm.c
--- a/drivers/w1/w1_therm.c	2005-03-04 12:37:51 -08:00
+++ b/drivers/w1/w1_therm.c	2005-03-04 12:37:51 -08:00
@@ -104,6 +104,7 @@
 	int i, max_trying = 10;
 
 	atomic_inc(&sl->refcnt);
+	smp_mb__after_atomic_inc();
 	if (down_interruptible(&sl->master->mutex)) {
 		count = 0;
 		goto out_dec;
@@ -179,6 +180,7 @@
 out:
 	up(&dev->mutex);
 out_dec:
+	smp_mb__before_atomic_inc();
 	atomic_dec(&sl->refcnt);
 
 	return count;


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-05  5:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-04 20:39 [BK PATCH] W1 patches for 2.6.11 Greg KH
2005-03-04 20:39 ` [PATCH] w1/w1_therm: replace schedule_timeout() with msleep_interruptible() Greg KH
2005-03-04 20:39   ` [PATCH] w1: dscore cleanups. 2/2 Greg KH
2005-03-04 20:39     ` [PATCH] w1: Core cleanup 1/2 Greg KH
2005-03-04 20:39       ` [PATCH] w1: fix some compiler warnings generated by the last "static" patch Greg KH
2005-03-04 20:39         ` [PATCH] w1: replace obsoleted *sleep_on* Greg KH
2005-03-04 20:39           ` [PATCH] w1: get rid of the potential problems with atomic operations Greg KH
2005-03-04 20:39             ` [PATCH] drivers/w1/*: convert to pci_register_driver Greg KH

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).