Skip to content

Commit

Permalink
Merge branch 'atm-constify-atm-pci_device_id'
Browse files Browse the repository at this point in the history
Arvind Yadav says:

====================
atm: constify atm pci_device_id.

pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by <linux/pci.h> work with
const pci_device_id. So mark the non-const structs as const.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 16, 2017
2 parents ccdb2d1 + 97ae5c2 commit ce3dbe2
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion drivers/atm/ambassador.c
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,7 @@ MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles");

/********** module entry **********/

static struct pci_device_id amb_pci_tbl[] = {
static const struct pci_device_id amb_pci_tbl[] = {
{ PCI_VDEVICE(MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR), 0 },
{ PCI_VDEVICE(MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD), 0 },
{ 0, }
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/eni.c
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ static int eni_init_one(struct pci_dev *pci_dev,
}


static struct pci_device_id eni_pci_tbl[] = {
static const struct pci_device_id eni_pci_tbl[] = {
{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_FPGA), 0 /* FPGA */ },
{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_ASIC), 1 /* ASIC */ },
{ 0, }
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/firestream.c
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@ static void firestream_remove_one(struct pci_dev *pdev)
func_exit ();
}

static struct pci_device_id firestream_pci_tbl[] = {
static const struct pci_device_id firestream_pci_tbl[] = {
{ PCI_VDEVICE(FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS50), FS_IS50},
{ PCI_VDEVICE(FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS155), FS_IS155},
{ 0, }
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/fore200e.c
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,7 @@ static void fore200e_pca_remove_one(struct pci_dev *pci_dev)
}


static struct pci_device_id fore200e_pca_tbl[] = {
static const struct pci_device_id fore200e_pca_tbl[] = {
{ PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID,
0, 0, (unsigned long) &fore200e_bus[0] },
{ 0, }
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,7 @@ MODULE_PARM_DESC(irq_coalesce, "use interrupt coalescing (default 1)");
module_param(sdh, bool, 0);
MODULE_PARM_DESC(sdh, "use SDH framing (default 0)");

static struct pci_device_id he_pci_tbl[] = {
static const struct pci_device_id he_pci_tbl[] = {
{ PCI_VDEVICE(FORE, PCI_DEVICE_ID_FORE_HE), 0 },
{ 0, }
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/horizon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2867,7 +2867,7 @@ MODULE_PARM_DESC(max_tx_size, "maximum size of TX AAL5 frames");
MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames");
MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles");

static struct pci_device_id hrz_pci_tbl[] = {
static const struct pci_device_id hrz_pci_tbl[] = {
{ PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID,
0, 0, 0 },
{ 0, }
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/idt77252.c
Original file line number Diff line number Diff line change
Expand Up @@ -3725,7 +3725,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
return err;
}

static struct pci_device_id idt77252_pci_tbl[] =
static const struct pci_device_id idt77252_pci_tbl[] =
{
{ PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77252), 0 },
{ 0, }
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/iphase.c
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,7 @@ static void ia_remove_one(struct pci_dev *pdev)
kfree(iadev);
}

static struct pci_device_id ia_pci_tbl[] = {
static const struct pci_device_id ia_pci_tbl[] = {
{ PCI_VENDOR_ID_IPHASE, 0x0008, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_IPHASE, 0x0009, PCI_ANY_ID, PCI_ANY_ID, },
{ 0,}
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/lanai.c
Original file line number Diff line number Diff line change
Expand Up @@ -2589,7 +2589,7 @@ static int lanai_init_one(struct pci_dev *pci,
return result;
}

static struct pci_device_id lanai_pci_tbl[] = {
static const struct pci_device_id lanai_pci_tbl[] = {
{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_LANAI2) },
{ PCI_VDEVICE(EF, PCI_DEVICE_ID_EF_ATM_LANAIHB) },
{ 0, } /* terminal entry */
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/nicstar.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static void nicstar_remove_one(struct pci_dev *pcidev)
kfree(card);
}

static struct pci_device_id nicstar_pci_tbl[] = {
static const struct pci_device_id nicstar_pci_tbl[] = {
{ PCI_VDEVICE(IDT, PCI_DEVICE_ID_IDT_IDT77201), 0 },
{0,} /* terminate list */
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/solos-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ static void fpga_remove(struct pci_dev *dev)
kfree(card);
}

static struct pci_device_id fpga_pci_tbl[] = {
static const struct pci_device_id fpga_pci_tbl[] = {
{ 0x10ee, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, }
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/atm/zatm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ static int zatm_init_one(struct pci_dev *pci_dev,

MODULE_LICENSE("GPL");

static struct pci_device_id zatm_pci_tbl[] = {
static const struct pci_device_id zatm_pci_tbl[] = {
{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1221), ZATM_COPPER },
{ PCI_VDEVICE(ZEITNET, PCI_DEVICE_ID_ZEITNET_1225), 0 },
{ 0, }
Expand Down

0 comments on commit ce3dbe2

Please sign in to comment.