Lines Matching defs:unit
98 * @directory: e.g. root directory or unit directory
135 static void get_modalias_ids(struct fw_unit *unit, int *id)
137 get_ids(&fw_parent_device(unit)->config_rom[5], id);
138 get_ids(unit->directory, id);
197 static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
201 get_modalias_ids(unit, id);
210 struct fw_unit *unit = fw_unit(dev);
213 get_modalias(unit, modalias, sizeof(modalias));
359 struct fw_unit *unit = fw_unit(dev);
362 length = get_modalias(unit, buf, PAGE_SIZE);
372 struct fw_unit *unit = fw_unit(dev);
375 (int)(unit->directory - device->config_rom));
672 struct fw_unit *unit = fw_unit(dev);
674 fw_device_put(fw_parent_device(unit));
675 kfree(unit);
691 struct fw_unit *unit;
701 * Get the address of the unit directory and try to
704 unit = kzalloc(sizeof(*unit), GFP_KERNEL);
705 if (unit == NULL)
708 unit->directory = ci.p + value - 1;
709 unit->device.bus = &fw_bus_type;
710 unit->device.type = &fw_unit_type;
711 unit->device.parent = &device->device;
712 dev_set_name(&unit->device, "%s.%d", dev_name(&device->device), i++);
714 BUILD_BUG_ON(ARRAY_SIZE(unit->attribute_group.attrs) <
717 init_fw_attribute_group(&unit->device,
719 &unit->attribute_group);
722 if (device_register(&unit->device) < 0) {
723 put_device(&unit->device);
846 struct fw_unit *unit = fw_unit(dev);
851 driver->update(unit);