Skip to content

Commit d43e423

Browse files
committed
Merge branch 'pci/endpoint'
- Make struct pci_epc_event_ops and struct pci_epf_ops instances const (Lars-Peter Clausen) * pci/endpoint: PCI: endpoint: pci-epf-test: Make struct pci_epf_ops const PCI: endpoint: pci-epf-vntb: Make struct pci_epf_ops const PCI: endpoint: pci-epf-ntb: Make struct pci_epf_ops const PCI: endpoint: pci-epf-mhi: Make structs pci_epf_ops and pci_epf_event_ops const PCI: endpoint: Make struct pci_epf_ops in pci_epf_driver const
2 parents dc14155 + 6f517e0 commit d43e423

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

drivers/pci/endpoint/functions/pci-epf-mhi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ static void pci_epf_mhi_unbind(struct pci_epf *epf)
644644
pci_epc_clear_bar(epc, epf->func_no, epf->vfunc_no, epf_bar);
645645
}
646646

647-
static struct pci_epc_event_ops pci_epf_mhi_event_ops = {
647+
static const struct pci_epc_event_ops pci_epf_mhi_event_ops = {
648648
.core_init = pci_epf_mhi_core_init,
649649
.link_up = pci_epf_mhi_link_up,
650650
.link_down = pci_epf_mhi_link_down,
@@ -682,7 +682,7 @@ static const struct pci_epf_device_id pci_epf_mhi_ids[] = {
682682
{},
683683
};
684684

685-
static struct pci_epf_ops pci_epf_mhi_ops = {
685+
static const struct pci_epf_ops pci_epf_mhi_ops = {
686686
.unbind = pci_epf_mhi_unbind,
687687
.bind = pci_epf_mhi_bind,
688688
};

drivers/pci/endpoint/functions/pci-epf-ntb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ static int epf_ntb_probe(struct pci_epf *epf,
20992099
return 0;
21002100
}
21012101

2102-
static struct pci_epf_ops epf_ntb_ops = {
2102+
static const struct pci_epf_ops epf_ntb_ops = {
21032103
.bind = epf_ntb_bind,
21042104
.unbind = epf_ntb_unbind,
21052105
.add_cfs = epf_ntb_add_cfs,

drivers/pci/endpoint/functions/pci-epf-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ static int pci_epf_test_probe(struct pci_epf *epf,
973973
return 0;
974974
}
975975

976-
static struct pci_epf_ops ops = {
976+
static const struct pci_epf_ops ops = {
977977
.unbind = pci_epf_test_unbind,
978978
.bind = pci_epf_test_bind,
979979
};

drivers/pci/endpoint/functions/pci-epf-vntb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ static void epf_ntb_unbind(struct pci_epf *epf)
13841384
}
13851385

13861386
// EPF driver probe
1387-
static struct pci_epf_ops epf_ntb_ops = {
1387+
static const struct pci_epf_ops epf_ntb_ops = {
13881388
.bind = epf_ntb_bind,
13891389
.unbind = epf_ntb_unbind,
13901390
.add_cfs = epf_ntb_add_cfs,

include/linux/pci-epf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct pci_epf_driver {
9898
void (*remove)(struct pci_epf *epf);
9999

100100
struct device_driver driver;
101-
struct pci_epf_ops *ops;
101+
const struct pci_epf_ops *ops;
102102
struct module *owner;
103103
struct list_head epf_group;
104104
const struct pci_epf_device_id *id_table;

0 commit comments

Comments
 (0)