Lines Matching defs:hdev
97 struct hnae_ae_dev *hdev = cls_to_ae_dev(dev);
99 if (dev_of_node(hdev->dev))
100 return (data == &hdev->dev->of_node->fwnode);
101 else if (is_acpi_node(hdev->dev->fwnode))
102 return (data == hdev->dev->fwnode);
398 * @hdev: the hnae ae engine device
402 int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner)
407 if (!hdev->dev)
410 if (!hdev->ops || !hdev->ops->get_handle ||
411 !hdev->ops->toggle_ring_irq ||
412 !hdev->ops->get_status || !hdev->ops->adjust_link)
415 hdev->owner = owner;
416 hdev->id = (int)atomic_inc_return(&id);
417 hdev->cls_dev.parent = hdev->dev;
418 hdev->cls_dev.class = hnae_class;
419 hdev->cls_dev.release = hnae_release;
420 (void)dev_set_name(&hdev->cls_dev, "hnae%d", hdev->id);
421 ret = device_register(&hdev->cls_dev);
423 put_device(&hdev->cls_dev);
429 INIT_LIST_HEAD(&hdev->handle_list);
430 spin_lock_init(&hdev->lock);
434 dev_dbg(hdev->dev,
435 "has not notifier for AE: %s\n", hdev->name);
443 * @hdev: the device to unregister
445 void hnae_ae_unregister(struct hnae_ae_dev *hdev)
447 device_unregister(&hdev->cls_dev);