Lines Matching refs:md

84 	struct w1_master *md = dev_to_w1_master(dev);  in w1_master_release()  local
86 dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); in w1_master_release()
87 memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); in w1_master_release()
88 kfree(md); in w1_master_release()
223 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_name() local
226 mutex_lock(&md->mutex); in w1_master_attribute_show_name()
227 count = sprintf(buf, "%s\n", md->name); in w1_master_attribute_show_name()
228 mutex_unlock(&md->mutex); in w1_master_attribute_show_name()
238 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_search() local
245 mutex_lock(&md->mutex); in w1_master_attribute_store_search()
246 md->search_count = tmp; in w1_master_attribute_store_search()
247 mutex_unlock(&md->mutex); in w1_master_attribute_store_search()
250 wake_up_process(md->thread); in w1_master_attribute_store_search()
259 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_search() local
262 mutex_lock(&md->mutex); in w1_master_attribute_show_search()
263 count = sprintf(buf, "%d\n", md->search_count); in w1_master_attribute_show_search()
264 mutex_unlock(&md->mutex); in w1_master_attribute_show_search()
274 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_pullup() local
281 mutex_lock(&md->mutex); in w1_master_attribute_store_pullup()
282 md->enable_pullup = tmp; in w1_master_attribute_store_pullup()
283 mutex_unlock(&md->mutex); in w1_master_attribute_store_pullup()
292 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_pullup() local
295 mutex_lock(&md->mutex); in w1_master_attribute_show_pullup()
296 count = sprintf(buf, "%d\n", md->enable_pullup); in w1_master_attribute_show_pullup()
297 mutex_unlock(&md->mutex); in w1_master_attribute_show_pullup()
304 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_pointer() local
307 mutex_lock(&md->mutex); in w1_master_attribute_show_pointer()
308 count = sprintf(buf, "0x%p\n", md->bus_master); in w1_master_attribute_show_pointer()
309 mutex_unlock(&md->mutex); in w1_master_attribute_show_pointer()
324 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_max_slave_count() local
329 mutex_lock(&md->mutex); in w1_master_attribute_store_max_slave_count()
330 md->max_slave_count = tmp; in w1_master_attribute_store_max_slave_count()
332 clear_bit(W1_WARN_MAX_COUNT, &md->flags); in w1_master_attribute_store_max_slave_count()
333 mutex_unlock(&md->mutex); in w1_master_attribute_store_max_slave_count()
340 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_max_slave_count() local
343 mutex_lock(&md->mutex); in w1_master_attribute_show_max_slave_count()
344 count = sprintf(buf, "%d\n", md->max_slave_count); in w1_master_attribute_show_max_slave_count()
345 mutex_unlock(&md->mutex); in w1_master_attribute_show_max_slave_count()
351 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_attempts() local
354 mutex_lock(&md->mutex); in w1_master_attribute_show_attempts()
355 count = sprintf(buf, "%lu\n", md->attempts); in w1_master_attribute_show_attempts()
356 mutex_unlock(&md->mutex); in w1_master_attribute_show_attempts()
362 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_slave_count() local
365 mutex_lock(&md->mutex); in w1_master_attribute_show_slave_count()
366 count = sprintf(buf, "%d\n", md->slave_count); in w1_master_attribute_show_slave_count()
367 mutex_unlock(&md->mutex); in w1_master_attribute_show_slave_count()
374 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_show_slaves() local
379 mutex_lock(&md->list_mutex); in w1_master_attribute_show_slaves()
381 list_for_each_safe(ent, n, &md->slist) { in w1_master_attribute_show_slaves()
389 mutex_unlock(&md->list_mutex); in w1_master_attribute_show_slaves()
466 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_add() local
474 mutex_lock(&md->mutex); in w1_master_attribute_store_add()
475 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_add()
484 w1_attach_slave_device(md, &rn); in w1_master_attribute_store_add()
486 mutex_unlock(&md->mutex); in w1_master_attribute_store_add()
504 struct w1_master *md = dev_to_w1_master(dev); in w1_master_attribute_store_remove() local
512 mutex_lock(&md->mutex); in w1_master_attribute_store_remove()
513 sl = w1_slave_search_device(md, &rn); in w1_master_attribute_store_remove()
524 mutex_unlock(&md->mutex); in w1_master_attribute_store_remove()
583 struct w1_master *md = NULL; in w1_uevent() local
589 md = container_of(dev, struct w1_master, dev); in w1_uevent()
591 name = md->name; in w1_uevent()