Re: [PATCH 06/39] dma: remove DEFINE_PCI_DEVICE_TABLE macro

Joe Perches
2013-12-02T23:11:36Z

On Tue, 2013-12-03 at 08:05 +0900, Jingoo Han wrote:
> Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
> is not preferred.
[]
> diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
[]
> @@ -996,7 +996,7 @@ static void pch_dma_remove(struct pci_dev *pdev)
> #define PCI_DEVICE_ID_ML7831_DMA1_8CH 0x8810
> #define PCI_DEVICE_ID_ML7831_DMA2_4CH 0x8815
>
> -DEFINE_PCI_DEVICE_TABLE(pch_dma_id_table) = {
> +const struct pci_device_id pch_dma_id_table[] = {
> { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_EG20T_PCH_DMA_8CH), 8 },
> { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_EG20T_PCH_DMA_4CH), 4 },
> { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_DMA1_8CH), 8}, /* UART Video */

As you do these, please check/verify if the converted
table should also be static and add it where appropriate.

$ git grep -w pch_dma_id_table
drivers/dma/pch_dma.c:DEFINE_PCI_DEVICE_TABLE(pch_dma_id_table) = {
drivers/dma/pch_dma.c: .id_table = pch_dma_id_table,
drivers/dma/pch_dma.c:MODULE_DEVICE_TABLE(pci, pch_dma_id_table);