From: Bhumika Goyal Date: Tue, 12 Sep 2017 11:13:33 +0000 (+0530) Subject: PCI: Constify pci_dev_type structure X-Git-Tag: v4.19~2179^2~20^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69f2dc24ff32ae61291dc63525d70c06ac9d8ba3;p=platform%2Fkernel%2Flinux-rpi.git PCI: Constify pci_dev_type structure Make this const as it not modified in the file referencing it. It is only stored in a const field 'type' of a device structure. Also, add const to the variable declaration in the header file. Signed-off-by: Bhumika Goyal Signed-off-by: Bjorn Helgaas --- diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 8e075ea..5aa81ad 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -1795,6 +1795,6 @@ static const struct attribute_group *pci_dev_attr_groups[] = { NULL, }; -struct device_type pci_dev_type = { +const struct device_type pci_dev_type = { .groups = pci_dev_attr_groups, }; diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a6560c9..1db36f2 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -192,7 +192,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev) } extern const struct attribute_group *pci_dev_groups[]; extern const struct attribute_group *pcibus_groups[]; -extern struct device_type pci_dev_type; +extern const struct device_type pci_dev_type; extern const struct attribute_group *pci_bus_groups[];