Lines Matching refs:item
111 struct config_item item; member
142 if (config_item_name(&nt->item)) in netconsole_target_get()
143 config_item_get(&nt->item); in netconsole_target_get()
148 if (config_item_name(&nt->item)) in netconsole_target_put()
149 config_item_put(&nt->item); in netconsole_target_put()
247 static struct netconsole_target *to_target(struct config_item *item) in to_target() argument
249 return item ? in to_target()
250 container_of(item, struct netconsole_target, item) : in to_target()
258 static ssize_t enabled_show(struct config_item *item, char *buf) in enabled_show() argument
260 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->enabled); in enabled_show()
263 static ssize_t extended_show(struct config_item *item, char *buf) in extended_show() argument
265 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->extended); in extended_show()
268 static ssize_t dev_name_show(struct config_item *item, char *buf) in dev_name_show() argument
270 return snprintf(buf, PAGE_SIZE, "%s\n", to_target(item)->np.dev_name); in dev_name_show()
273 static ssize_t local_port_show(struct config_item *item, char *buf) in local_port_show() argument
275 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->np.local_port); in local_port_show()
278 static ssize_t remote_port_show(struct config_item *item, char *buf) in remote_port_show() argument
280 return snprintf(buf, PAGE_SIZE, "%d\n", to_target(item)->np.remote_port); in remote_port_show()
283 static ssize_t local_ip_show(struct config_item *item, char *buf) in local_ip_show() argument
285 struct netconsole_target *nt = to_target(item); in local_ip_show()
293 static ssize_t remote_ip_show(struct config_item *item, char *buf) in remote_ip_show() argument
295 struct netconsole_target *nt = to_target(item); in remote_ip_show()
303 static ssize_t local_mac_show(struct config_item *item, char *buf) in local_mac_show() argument
305 struct net_device *dev = to_target(item)->np.dev; in local_mac_show()
311 static ssize_t remote_mac_show(struct config_item *item, char *buf) in remote_mac_show() argument
313 return snprintf(buf, PAGE_SIZE, "%pM\n", to_target(item)->np.remote_mac); in remote_mac_show()
323 static ssize_t enabled_store(struct config_item *item, in enabled_store() argument
326 struct netconsole_target *nt = to_target(item); in enabled_store()
382 static ssize_t extended_store(struct config_item *item, const char *buf, in extended_store() argument
385 struct netconsole_target *nt = to_target(item); in extended_store()
392 config_item_name(&nt->item)); in extended_store()
414 static ssize_t dev_name_store(struct config_item *item, const char *buf, in dev_name_store() argument
417 struct netconsole_target *nt = to_target(item); in dev_name_store()
423 config_item_name(&nt->item)); in dev_name_store()
439 static ssize_t local_port_store(struct config_item *item, const char *buf, in local_port_store() argument
442 struct netconsole_target *nt = to_target(item); in local_port_store()
448 config_item_name(&nt->item)); in local_port_store()
462 static ssize_t remote_port_store(struct config_item *item, in remote_port_store() argument
465 struct netconsole_target *nt = to_target(item); in remote_port_store()
471 config_item_name(&nt->item)); in remote_port_store()
485 static ssize_t local_ip_store(struct config_item *item, const char *buf, in local_ip_store() argument
488 struct netconsole_target *nt = to_target(item); in local_ip_store()
493 config_item_name(&nt->item)); in local_ip_store()
521 static ssize_t remote_ip_store(struct config_item *item, const char *buf, in remote_ip_store() argument
524 struct netconsole_target *nt = to_target(item); in remote_ip_store()
529 config_item_name(&nt->item)); in remote_ip_store()
557 static ssize_t remote_mac_store(struct config_item *item, const char *buf, in remote_mac_store() argument
560 struct netconsole_target *nt = to_target(item); in remote_mac_store()
566 config_item_name(&nt->item)); in remote_mac_store()
610 static void netconsole_target_release(struct config_item *item) in netconsole_target_release() argument
612 kfree(to_target(item)); in netconsole_target_release()
650 config_item_init_type_name(&nt->item, name, &netconsole_target_type); in make_netconsole_target()
657 return &nt->item; in make_netconsole_target()
661 struct config_item *item) in drop_netconsole_target() argument
664 struct netconsole_target *nt = to_target(item); in drop_netconsole_target()
677 config_item_put(&nt->item); in drop_netconsole_target()