mtd: pci: constify pci_device_id.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 3 Aug 2017 16:22:10 +0000 (21:52 +0530)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 15 Aug 2017 12:00:46 +0000 (14:00 +0200)
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: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/maps/pci.c

index eb0242e0b2d9903df922f811e41b9584a39cb212..7b3bb40aff723f1be35353a423c150d194cb9771 100644 (file)
@@ -228,7 +228,7 @@ static struct mtd_pci_info intel_dc21285_info = {
  * PCI device ID table
  */
 
-static struct pci_device_id mtd_pci_ids[] = {
+static const struct pci_device_id mtd_pci_ids[] = {
        {
                .vendor =       PCI_VENDOR_ID_INTEL,
                .device =       0x530d,