w1: allow bus master to have reset and byte ops
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Tue, 8 May 2007 07:31:20 +0000 (00:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:14 +0000 (11:15 -0700)
Signed-off-by: Matt Reimer <mreimer@vpop.net>
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/w1/w1_int.c

index 357a2e0f637a1d7270e247d146c00131d4374f62..258defdb2efd1cb82d242be2024ab49029a70e58 100644 (file)
@@ -100,7 +100,8 @@ int w1_add_master_device(struct w1_bus_master *master)
 
         /* validate minimum functionality */
         if (!(master->touch_bit && master->reset_bus) &&
-            !(master->write_bit && master->read_bit)) {
+            !(master->write_bit && master->read_bit) &&
+           !(master->write_byte && master->read_byte && master->reset_bus)) {
                printk(KERN_ERR "w1_add_master_device: invalid function set\n");
                return(-EINVAL);
         }