Re: [PATCH 1/3] usb: dwc3: pci: use PCI_VDEVICE macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx> writes:
> The ID table becomes a bit more uniform that way. Also
> sorting the IDs alphabetically.
>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/dwc3/dwc3-pci.c | 31 +++++++++++--------------------
>  1 file changed, 11 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
> index 009d830..23d4f10 100644
> --- a/drivers/usb/dwc3/dwc3-pci.c
> +++ b/drivers/usb/dwc3/dwc3-pci.c
> @@ -195,26 +195,17 @@ static void dwc3_pci_remove(struct pci_dev *pci)
>  }
>  
>  static const struct pci_device_id dwc3_pci_id_table[] = {
> -	{
> -		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
> -				PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3),
> -	},
> -	{
> -		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
> -				PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI),
> -	},
> -	{
> -		PCI_DEVICE(PCI_VENDOR_ID_SYNOPSYS,
> -				PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31),
> -	},
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BSW), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BYT), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MRFLD), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SPTLP), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SPTH), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BXT), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_APL), },
> -	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB), },
> +	{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_NL_USB), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_APL), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_BSW), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_BYT), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_BXT), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MRFLD), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_SPTH), },
> +	{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_SPTLP), },
> +	{ PCI_VDEVICE(SYNOPSYS, PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3), },
> +	{ PCI_VDEVICE(SYNOPSYS, PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI), },
> +	{ PCI_VDEVICE(SYNOPSYS, PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31), },
 
All of a sudden, M-. doesn't work anymore :-( IMO, it's a bit too much
obfuscation for virtually no benefit. Do you really think this is
necessary ?

The alphabetical sorting part is very welcome, though.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux