Skip to content

Commit 2da73d2

Browse files
committed
Merge branch 'isdn-const-pci_device_ids'
Arvind Yadav says: ==================== Constify isdn pci_device_id's. 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>
2 parents 3298456 + 65f9641 commit 2da73d2

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

drivers/isdn/hardware/avm/c4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static char *revision = "$Revision: 1.1.2.2 $";
4242

4343
static bool suppress_pollack;
4444

45-
static struct pci_device_id c4_pci_tbl[] = {
45+
static const struct pci_device_id c4_pci_tbl[] = {
4646
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, 0, 0, (unsigned long)4 },
4747
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C2, 0, 0, (unsigned long)2 },
4848
{ } /* Terminating entry */

drivers/isdn/hardware/eicon/divasmain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ typedef struct _diva_os_thread_dpc {
110110
/*
111111
This table should be sorted by PCI device ID
112112
*/
113-
static struct pci_device_id divas_pci_tbl[] = {
113+
static const struct pci_device_id divas_pci_tbl[] = {
114114
/* Diva Server BRI-2M PCI 0xE010 */
115115
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRA),
116116
CARDTYPE_MAESTRA_PCI },

drivers/isdn/hardware/mISDN/avmfritz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ fritz_remove_pci(struct pci_dev *pdev)
11421142
pr_info("%s: drvdata already removed\n", __func__);
11431143
}
11441144

1145-
static struct pci_device_id fcpci_ids[] = {
1145+
static const struct pci_device_id fcpci_ids[] = {
11461146
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID,
11471147
0, 0, (unsigned long) "Fritz!Card PCI"},
11481148
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID,

drivers/isdn/hardware/mISDN/hfcmulti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5348,7 +5348,7 @@ static const struct hm_map hfcm_map[] = {
53485348

53495349
#undef H
53505350
#define H(x) ((unsigned long)&hfcm_map[x])
5351-
static struct pci_device_id hfmultipci_ids[] = {
5351+
static const struct pci_device_id hfmultipci_ids[] = {
53525352

53535353
/* Cards with HFC-4S Chip */
53545354
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,

drivers/isdn/hardware/mISDN/hfcpci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2161,7 +2161,7 @@ static const struct _hfc_map hfc_map[] =
21612161
{},
21622162
};
21632163

2164-
static struct pci_device_id hfc_ids[] =
2164+
static const struct pci_device_id hfc_ids[] =
21652165
{
21662166
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_2BD0),
21672167
(unsigned long) &hfc_map[0] },

drivers/isdn/hardware/mISDN/netjet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static void nj_remove(struct pci_dev *pdev)
11371137
/* We cannot select cards with PCI_SUB... IDs, since here are cards with
11381138
* SUB IDs set to PCI_ANY_ID, so we need to match all and reject
11391139
* known other cards which not work with this driver - see probe function */
1140-
static struct pci_device_id nj_pci_ids[] = {
1140+
static const struct pci_device_id nj_pci_ids[] = {
11411141
{ PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300,
11421142
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
11431143
{ }

drivers/isdn/hardware/mISDN/w6692.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ w6692_remove_pci(struct pci_dev *pdev)
13981398
pr_notice("%s: drvdata already removed\n", __func__);
13991399
}
14001400

1401-
static struct pci_device_id w6692_ids[] = {
1401+
static const struct pci_device_id w6692_ids[] = {
14021402
{ PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH,
14031403
PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[0]},
14041404
{ PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,

drivers/isdn/hisax/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
19091909
#ifdef CONFIG_PCI
19101910
#include <linux/pci.h>
19111911

1912-
static struct pci_device_id hisax_pci_tbl[] __used = {
1912+
static const struct pci_device_id hisax_pci_tbl[] __used = {
19131913
#ifdef CONFIG_HISAX_FRITZPCI
19141914
{PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) },
19151915
#endif

drivers/isdn/hisax/hfc4s8s_l1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ typedef struct {
8686
char *device_name;
8787
} hfc4s8s_param;
8888

89-
static struct pci_device_id hfc4s8s_ids[] = {
89+
static const struct pci_device_id hfc4s8s_ids[] = {
9090
{.vendor = PCI_VENDOR_ID_CCD,
9191
.device = PCI_DEVICE_ID_4S,
9292
.subvendor = 0x1397,

drivers/isdn/hisax/hisax_fcpcipnp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module_param(debug, int, 0);
5252
MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Karsten Keil <kkeil@suse.de>");
5353
MODULE_DESCRIPTION("AVM Fritz!PCI/PnP ISDN driver");
5454

55-
static struct pci_device_id fcpci_ids[] = {
55+
static const struct pci_device_id fcpci_ids[] = {
5656
{ .vendor = PCI_VENDOR_ID_AVM,
5757
.device = PCI_DEVICE_ID_AVM_A1,
5858
.subvendor = PCI_ANY_ID,

0 commit comments

Comments
 (0)