Lines Matching defs:dev_ctx
49 struct mlx4_device_context *dev_ctx;
51 dev_ctx = kmalloc(sizeof *dev_ctx, GFP_KERNEL);
52 if (!dev_ctx)
55 dev_ctx->intf = intf;
56 dev_ctx->context = intf->add(&priv->dev);
58 if (dev_ctx->context) {
60 list_add_tail(&dev_ctx->list, &priv->ctx_list);
63 kfree(dev_ctx);
68 struct mlx4_device_context *dev_ctx;
70 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
71 if (dev_ctx->intf == intf) {
73 list_del(&dev_ctx->list);
76 intf->remove(&priv->dev, dev_ctx->context);
77 kfree(dev_ctx);
120 struct mlx4_device_context *dev_ctx;
125 list_for_each_entry(dev_ctx, &priv->ctx_list, list)
126 if (dev_ctx->intf->event)
127 dev_ctx->intf->event(dev, dev_ctx->context, type,