Lines Matching defs:component
119 kzalloc(struct_size(edev, component, components), GFP_KERNEL);
138 edev->component[i].number = -1;
139 edev->component[i].slot = -1;
140 edev->component[i].power_status = -1;
172 if (edev->component[i].number != -1)
173 device_unregister(&edev->component[i].cdev);
255 ecomp = &edev->component[i];
269 * enclosure_component_alloc - prepare a new enclosure component
270 * @edev: the enclosure to add the component
272 * @type: the type of component being added
278 * Returns a pointer to the enclosure component or an error.
294 ecomp = &edev->component[number];
327 * enclosure_component_register - publishes an initialized enclosure component
328 * @ecomp: component to add
330 * Returns 0 on successful registration, releases the component otherwise
352 * @component: the number of the component
363 int enclosure_add_device(struct enclosure_device *edev, int component,
369 if (!edev || component >= edev->components)
372 cdev = &edev->component[component];
408 cdev = &edev->component[i];