[Intel-wired-lan] [net-next v3 02/15] idpf: add module register and probe functionality

Shannon Nelson shannon.nelson at amd.com
Thu Apr 27 23:24:23 UTC 2023


On 4/26/23 7:09 PM, Emil Tantilov wrote:
> 
> From: Phani Burra <phani.r.burra at intel.com>
> 

[...]

> +static int idpf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> +{
> +       struct device *dev = &pdev->dev;
> +       struct idpf_adapter *adapter;
> +       int err;
> +
> +       adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
> +       if (!adapter)
> +               return -ENOMEM;
> +       adapter->pdev = pdev;

The custom more recently has been to allocate the devlink struct early 
on and build the device struct from that allocation.  You likely will 
want to follow along and play in the devlink world.

sln



More information about the Intel-wired-lan mailing list