Lines Matching refs:md
88 struct w1_master *md = dev_to_w1_master(dev); in w1_master_release() local
90 dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); in w1_master_release()
91 memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); in w1_master_release()
92 kfree(md); in w1_master_release()
227 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_name() local
230 mutex_lock(&md->mutex); in w1_master_attribute_show_name()
231 count = sprintf(buf, "%s\n", md->name); in w1_master_attribute_show_name()
232 mutex_unlock(&md->mutex); in w1_master_attribute_show_name()
242 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_search() local
249 mutex_lock(&md->mutex); in w1_master_attribute_store_search()
250 md->search_count = tmp; in w1_master_attribute_store_search()
251 mutex_unlock(&md->mutex); in w1_master_attribute_store_search()
254 wake_up_process(md->thread); in w1_master_attribute_store_search()
263 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_search() local
266 mutex_lock(&md->mutex); in w1_master_attribute_show_search()
267 count = sprintf(buf, "%d\n", md->search_count); in w1_master_attribute_show_search()
268 mutex_unlock(&md->mutex); in w1_master_attribute_show_search()
278 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_pullup() local
285 mutex_lock(&md->mutex); in w1_master_attribute_store_pullup()
286 md->enable_pullup = tmp; in w1_master_attribute_store_pullup()
287 mutex_unlock(&md->mutex); in w1_master_attribute_store_pullup()
296 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_pullup() local
299 mutex_lock(&md->mutex); in w1_master_attribute_show_pullup()
300 count = sprintf(buf, "%d\n", md->enable_pullup); in w1_master_attribute_show_pullup()
301 mutex_unlock(&md->mutex); in w1_master_attribute_show_pullup()
308 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_pointer() local
311 mutex_lock(&md->mutex); in w1_master_attribute_show_pointer()
312 count = sprintf(buf, "0x%p\n", md->bus_master); in w1_master_attribute_show_pointer()
313 mutex_unlock(&md->mutex); in w1_master_attribute_show_pointer()
336 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_max_slave_count() local
341 mutex_lock(&md->mutex); in w1_master_attribute_store_max_slave_count()
342 md->max_slave_count = tmp; in w1_master_attribute_store_max_slave_count()
344 clear_bit(W1_WARN_MAX_COUNT, &md->flags); in w1_master_attribute_store_max_slave_count()
345 mutex_unlock(&md->mutex); in w1_master_attribute_store_max_slave_count()
352 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_max_slave_count() local
355 mutex_lock(&md->mutex); in w1_master_attribute_show_max_slave_count()
356 count = sprintf(buf, "%d\n", md->max_slave_count); in w1_master_attribute_show_max_slave_count()
357 mutex_unlock(&md->mutex); in w1_master_attribute_show_max_slave_count()
363 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_attempts() local
366 mutex_lock(&md->mutex); in w1_master_attribute_show_attempts()
367 count = sprintf(buf, "%lu\n", md->attempts); in w1_master_attribute_show_attempts()
368 mutex_unlock(&md->mutex); in w1_master_attribute_show_attempts()
374 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_slave_count() local
377 mutex_lock(&md->mutex); in w1_master_attribute_show_slave_count()
378 count = sprintf(buf, "%d\n", md->slave_count); in w1_master_attribute_show_slave_count()
379 mutex_unlock(&md->mutex); in w1_master_attribute_show_slave_count()
386 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_slaves() local
391 mutex_lock(&md->list_mutex); in w1_master_attribute_show_slaves()
393 list_for_each_safe(ent, n, &md->slist) { in w1_master_attribute_show_slaves()
401 mutex_unlock(&md->list_mutex); in w1_master_attribute_show_slaves()
478 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_add() local
486 mutex_lock(&md->mutex); in w1_master_attribute_store_add()
487 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_add()
496 w1_attach_slave_device(md, &rn); in w1_master_attribute_store_add()
498 mutex_unlock(&md->mutex); in w1_master_attribute_store_add()
516 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_remove() local
524 mutex_lock(&md->mutex); in w1_master_attribute_store_remove()
525 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_remove()
536 mutex_unlock(&md->mutex); in w1_master_attribute_store_remove()
597 struct w1_master *md = NULL; in w1_uevent() local
603 md = container_of(dev, struct w1_master, dev); in w1_uevent()
605 name = md->name; in w1_uevent()