Re: [PATCH] mmc: sdhci-pci: Use macros in pci_ids definition

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

 



On 05/04/17 21:44, Matthias Kraemer wrote:
> This patch applies the PCI_DEVICE_ macros to specify the pci_ids instead
> of open-coding them within the sdhci-pci driver.
> 
> v2:
> Suggested-by Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Instead of using the generic PCI_ marcos, introduce device specific macros
> to be able to shorten the table entries even further.
> 
> Signed-off-by: Matthias Kraemer <matthiasmartinsson@xxxxxxxxx>
> ---
>  drivers/mmc/host/sdhci-pci-core.c | 673 +++++++-------------------------------
>  drivers/mmc/host/sdhci-pci.h      |  14 +
>  2 files changed, 139 insertions(+), 548 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 86560d5..b5292b0 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -992,554 +992,131 @@ static const struct sdhci_pci_fixes sdhci_amd = {
>  };
>  
>  static const struct pci_device_id pci_ids[] = {
> -	{
> -		.vendor		= PCI_VENDOR_ID_RICOH,
> -		.device		= PCI_DEVICE_ID_RICOH_R5C822,
> -		.subvendor	= PCI_ANY_ID,
> -		.subdevice	= PCI_ANY_ID,
> -		.driver_data	= (kernel_ulong_t)&sdhci_ricoh,
> -	},
> -
> -	{
> -		.vendor         = PCI_VENDOR_ID_RICOH,
> -		.device         = 0x843,
> -		.subvendor      = PCI_ANY_ID,
> -		.subdevice      = PCI_ANY_ID,
> -		.driver_data    = (kernel_ulong_t)&sdhci_ricoh_mmc,
> -	},
> -

<SNIP>

> +	{SDHCI_PCI_DEVICE(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C822,
> +			  sdhci_ricoh)},
> +	{SDHCI_PCI_DEVICE(PCI_VENDOR_ID_RICOH, 0x843, sdhci_ricoh_mmc)},

There are still duplicate PCI_VENDOR_ID_... and PCI_DEVICE_ID_... and
sdhci_... and {}.  I would just expect to see:

	SDHCI_PCI_DEV(RICOH, RICOH_R5C822, ricoh),
	SDHCI_PCI_DEV(RICOH, 0x843, ricoh_mmc),

Where there are numbers with no define, just define them:

	#define PCI_DEVICE_ID_0x843	0x843

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux