Re: [patch v1] x86/platform/mellanox: introduce support for Mellanox systems platform

From: Greg KH
Date: Mon Sep 12 2016 - 02:11:44 EST


On Sun, Sep 11, 2016 at 10:34:27PM -0700, Guenter Roeck wrote:
> > +static int mlxplat_lpc_config(struct mlxplat_priv *priv)
> > +{
> > + struct pci_dev *pdev = NULL;
> > + u16 dev_id;
> > + int err;
> > +
> > + pdev = pci_get_bus_and_slot(MLXPLAT_CPLD_LPC_CTRL_IFC_BUS_ID,
> > + PCI_DEVFN(MLXPLAT_CPLD_LPC_CTRL_IFC_SLOT_ID,
> > + MLXPLAT_CPLD_LPC_CTRL_IFC_FUNC_ID));
> > +
>
> Kind of unusual way to initialize a PCI device. If this can't be implemented
> as PCI driver, maybe it should be initialized using PCI quirks ?

That's a _very old_ way of writing a pci driver, I thought we had gotten
rid of all of that crud.

This needs to be a "normal" PCI driver, no need for it to be a platform
driver at all from what I can tell.

thanks,

greg k-h