Lines Matching defs:dev_ctx
51 struct mlx4_device_context *dev_ctx;
53 dev_ctx = kmalloc(sizeof *dev_ctx, GFP_KERNEL);
54 if (!dev_ctx)
57 dev_ctx->intf = intf;
58 dev_ctx->context = intf->add(&priv->dev);
60 if (dev_ctx->context) {
62 list_add_tail(&dev_ctx->list, &priv->ctx_list);
65 kfree(dev_ctx);
70 struct mlx4_device_context *dev_ctx;
72 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
73 if (dev_ctx->intf == intf) {
75 list_del(&dev_ctx->list);
78 intf->remove(&priv->dev, dev_ctx->context);
79 kfree(dev_ctx);
122 struct mlx4_device_context *dev_ctx;
127 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
128 if (dev_ctx->intf->event)
129 dev_ctx->intf->event(dev, dev_ctx->context, type, param);
172 struct mlx4_device_context *dev_ctx;
178 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
179 if (dev_ctx->intf->protocol == proto && dev_ctx->intf->get_dev) {
180 result = dev_ctx->intf->get_dev(dev, dev_ctx->context, port);