]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
thermal: intel_pch_thermal: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 2 Aug 2017 17:58:40 +0000 (23:28 +0530)
committerZhang Rui <rui.zhang@intel.com>
Tue, 8 Aug 2017 13:31:43 +0000 (21:31 +0800)
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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/intel_pch_thermal.c

index 8c39206e7d0b14f6a45d96a3a9d4178198925fda..9e8fb782b521bfe60acc1014f5e10adb0d756d5a 100644 (file)
@@ -387,7 +387,7 @@ static int intel_pch_thermal_resume(struct device *device)
        return ptd->ops->resume(ptd);
 }
 
-static struct pci_device_id intel_pch_thermal_id[] = {
+static const struct pci_device_id intel_pch_thermal_id[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_HSW_1),
                .driver_data = board_hsw, },
        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCH_THERMAL_DID_HSW_2),