[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Ve=CJ-ZRmaAFX+tezMJ4u11v=ptrDDORF485f3_iFEWeg@mail.gmail.com>
Date: Sat, 27 May 2017 16:13:58 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jan Kiszka <jan.kiszka@...mens.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices
On Fri, May 26, 2017 at 7:07 PM, Jan Kiszka <jan.kiszka@...mens.com> wrote:
> Make stmmac_default_data compatible with stmmac_pci_info.setup and use
> an info structure for all devices. This allows to make the probing more
> regular.
> +#define STMMAC_DEVICE(vendor_id, dev_id, info) { \
> + PCI_DEVICE(vendor_id, dev_id), \
Perhaps
#define STMMAC_DEVICE(_vid, _did, info) { \
PCI_DEVICE(PCI_VENDOR_ID_##_vid, _did), \
Or converting defines first to PCI_DEVICE_ID_*
and
#define STMMAC_DEVICE(_vid, _did, info) { \
PCI_DEVICE(PCI_VENDOR_ID_##_vid, PCI_DEVICE_ID_##_did),
\
which I like even better.
> + .driver_data = (kernel_ulong_t)&info \
> + }
> +
> static const struct pci_device_id stmmac_id_table[] = {
> - {PCI_DEVICE(STMMAC_VENDOR_ID, STMMAC_DEVICE_ID)},
> - {PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_MAC)},
> - {PCI_VDEVICE(INTEL, STMMAC_QUARK_ID), (kernel_ulong_t)&quark_pci_info},
> + STMMAC_DEVICE(STMMAC_VENDOR_ID, STMMAC_DEVICE_ID, stmmac_pci_info),
> + STMMAC_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_MAC,
> + stmmac_pci_info),
> + STMMAC_DEVICE(PCI_VENDOR_ID_INTEL, STMMAC_QUARK_ID, quark_pci_info),
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists