Lines Matching refs:new_sr
302 int wf_register_sensor(struct wf_sensor *new_sr) in wf_register_sensor() argument
308 if (!strcmp(sr->name, new_sr->name)) { in wf_register_sensor()
315 kref_init(&new_sr->ref); in wf_register_sensor()
316 list_add(&new_sr->link, &wf_sensors); in wf_register_sensor()
318 sysfs_attr_init(&new_sr->attr.attr); in wf_register_sensor()
319 new_sr->attr.attr.name = new_sr->name; in wf_register_sensor()
320 new_sr->attr.attr.mode = 0444; in wf_register_sensor()
321 new_sr->attr.show = wf_show_sensor; in wf_register_sensor()
322 new_sr->attr.store = NULL; in wf_register_sensor()
323 if (device_create_file(&wf_platform_device.dev, &new_sr->attr)) in wf_register_sensor()
325 " for %s\n", new_sr->name); in wf_register_sensor()
328 DBG("wf: Registered sensor %s\n", new_sr->name); in wf_register_sensor()
330 wf_notify(WF_EVENT_NEW_SENSOR, new_sr); in wf_register_sensor()