aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1_int.c
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2005-06-03 17:21:46 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-22 00:43:10 -0400
commitbe57ce267fd558c52d2389530c15618681b7cfa7 (patch)
tree74b9d71873a9bd3152c955114b846c251f7216a9 /drivers/w1/w1_int.c
parent4e470aa9642d49230bcdfbb393cf5a81da333aba (diff)
[PATCH] w1: Cleans up usage of touch_bit/w1_read_bit/w1_write_bit.
Cleans up usage of touch_bit/w1_read_bit/w1_write_bit. Signed-off-by: Ben Gardner <bgardner@wabtec.com> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r--drivers/w1/w1_int.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index ce24e3b3fc2a..280f140ae698 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -121,6 +121,14 @@ int w1_add_master_device(struct w1_bus_master *master)
121 int retval = 0; 121 int retval = 0;
122 struct w1_netlink_msg msg; 122 struct w1_netlink_msg msg;
123 123
124 /* validate minimum functionality */
125 if (!(master->touch_bit && master->reset_bus) &&
126 !(master->write_bit && master->read_bit))
127 {
128 printk(KERN_ERR "w1_add_master_device: invalid function set\n");
129 return(-EINVAL);
130 }
131
124 dev = w1_alloc_dev(w1_ids++, w1_max_slave_count, w1_max_slave_ttl, &w1_driver, &w1_device); 132 dev = w1_alloc_dev(w1_ids++, w1_max_slave_count, w1_max_slave_ttl, &w1_driver, &w1_device);
125 if (!dev) 133 if (!dev)
126 return -ENOMEM; 134 return -ENOMEM;