+ struct w1_master *md = dev_to_w1_master(dev);
+ ssize_t count;
+
+ if (down_interruptible (&md->mutex))
+ return -EBUSY;
+
+ count = sprintf(buf, "%s\n", md->name);
+
+ up(&md->mutex);
+
+ return count;
+}
+
+static ssize_t w1_master_attribute_store_search(struct device * dev,
+ struct device_attribute *attr,
+ const char * buf, size_t count)
+{
+ struct w1_master *md = dev_to_w1_master(dev);
+
+ if (down_interruptible (&md->mutex))
+ return -EBUSY;
+
+ md->search_count = simple_strtol(buf, NULL, 0);
+
+ up(&md->mutex);
+
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_search(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
+{
+ struct w1_master *md = dev_to_w1_master(dev);
+ ssize_t count;
+
+ if (down_interruptible (&md->mutex))
+ return -EBUSY;
+
+ count = sprintf(buf, "%d\n", md->search_count);
+
+ up(&md->mutex);
+
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_pointer(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct w1_master *md = dev_to_w1_master(dev);
+ ssize_t count;
+
+ if (down_interruptible(&md->mutex))
+ return -EBUSY;
+
+ count = sprintf(buf, "0x%p\n", md->bus_master);
+
+ up(&md->mutex);
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_timeout(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ ssize_t count;
+ count = sprintf(buf, "%d\n", w1_timeout);
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_max_slave_count(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct w1_master *md = dev_to_w1_master(dev);
+ ssize_t count;
+
+ if (down_interruptible(&md->mutex))
+ return -EBUSY;
+
+ count = sprintf(buf, "%d\n", md->max_slave_count);
+
+ up(&md->mutex);
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_attempts(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct w1_master *md = dev_to_w1_master(dev);
+ ssize_t count;
+
+ if (down_interruptible(&md->mutex))
+ return -EBUSY;
+
+ count = sprintf(buf, "%lu\n", md->attempts);
+
+ up(&md->mutex);
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_slave_count(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct w1_master *md = dev_to_w1_master(dev);
+ ssize_t count;
+
+ if (down_interruptible(&md->mutex))
+ return -EBUSY;
+
+ count = sprintf(buf, "%d\n", md->slave_count);
+
+ up(&md->mutex);
+ return count;
+}
+
+static ssize_t w1_master_attribute_show_slaves(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct w1_master *md = dev_to_w1_master(dev);