Lines Matching refs:item
80 * @item: Links us into the configfs subsystem hierarchy.
103 struct config_item item;
135 if (config_item_name(&nt->item))
136 config_item_get(&nt->item);
141 if (config_item_name(&nt->item))
142 config_item_put(&nt->item);
268 static struct netconsole_target *to_target(struct config_item *item)
270 return item ?
271 container_of(item, struct netconsole_target, item) :
279 static ssize_t enabled_show(struct config_item *item, char *buf)
281 return sysfs_emit(buf, "%d\n", to_target(item)->enabled);
284 static ssize_t extended_show(struct config_item *item, char *buf)
286 return sysfs_emit(buf, "%d\n", to_target(item)->extended);
289 static ssize_t release_show(struct config_item *item, char *buf)
291 return sysfs_emit(buf, "%d\n", to_target(item)->release);
294 static ssize_t dev_name_show(struct config_item *item, char *buf)
296 return sysfs_emit(buf, "%s\n", to_target(item)->np.dev_name);
299 static ssize_t local_port_show(struct config_item *item, char *buf)
301 return sysfs_emit(buf, "%d\n", to_target(item)->np.local_port);
304 static ssize_t remote_port_show(struct config_item *item, char *buf)
306 return sysfs_emit(buf, "%d\n", to_target(item)->np.remote_port);
309 static ssize_t local_ip_show(struct config_item *item, char *buf)
311 struct netconsole_target *nt = to_target(item);
319 static ssize_t remote_ip_show(struct config_item *item, char *buf)
321 struct netconsole_target *nt = to_target(item);
329 static ssize_t local_mac_show(struct config_item *item, char *buf)
331 struct net_device *dev = to_target(item)->np.dev;
337 static ssize_t remote_mac_show(struct config_item *item, char *buf)
339 return sysfs_emit(buf, "%pM\n", to_target(item)->np.remote_mac);
349 static ssize_t enabled_store(struct config_item *item,
352 struct netconsole_target *nt = to_target(item);
409 static ssize_t release_store(struct config_item *item, const char *buf,
412 struct netconsole_target *nt = to_target(item);
419 config_item_name(&nt->item));
437 static ssize_t extended_store(struct config_item *item, const char *buf,
440 struct netconsole_target *nt = to_target(item);
447 config_item_name(&nt->item));
465 static ssize_t dev_name_store(struct config_item *item, const char *buf,
468 struct netconsole_target *nt = to_target(item);
474 config_item_name(&nt->item));
490 static ssize_t local_port_store(struct config_item *item, const char *buf,
493 struct netconsole_target *nt = to_target(item);
499 config_item_name(&nt->item));
513 static ssize_t remote_port_store(struct config_item *item,
516 struct netconsole_target *nt = to_target(item);
522 config_item_name(&nt->item));
536 static ssize_t local_ip_store(struct config_item *item, const char *buf,
539 struct netconsole_target *nt = to_target(item);
544 config_item_name(&nt->item));
572 static ssize_t remote_ip_store(struct config_item *item, const char *buf,
575 struct netconsole_target *nt = to_target(item);
580 config_item_name(&nt->item));
608 static ssize_t remote_mac_store(struct config_item *item, const char *buf,
611 struct netconsole_target *nt = to_target(item);
617 config_item_name(&nt->item));
663 static void netconsole_target_release(struct config_item *item)
665 kfree(to_target(item));
693 config_item_init_type_name(&nt->item, name, &netconsole_target_type);
700 return &nt->item;
704 struct config_item *item)
707 struct netconsole_target *nt = to_target(item);
720 config_item_put(&nt->item);