mei: me: constify the device parameter to the probe quirk
authorTomas Winkler <tomas.winkler@intel.com>
Fri, 19 Jun 2020 16:51:16 +0000 (19:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Jun 2020 16:40:26 +0000 (18:40 +0200)
The quirk_probe there is no writing to pci device hence
we can constify the passed pci_dev pointer.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20200619165121.2145330-2-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/hw-me.c
drivers/misc/mei/hw-me.h

index 7649710a2ab9e9937d54dd9ded6ce9a6071f259f..f977a150a685a2ff26d493520ea4281fcef6b75f 100644 (file)
@@ -1353,7 +1353,7 @@ static const struct mei_hw_ops mei_me_hw_ops = {
        .read = mei_me_read_slots
 };
 
-static bool mei_me_fw_type_nm(struct pci_dev *pdev)
+static bool mei_me_fw_type_nm(const struct pci_dev *pdev)
 {
        u32 reg;
 
@@ -1366,7 +1366,7 @@ static bool mei_me_fw_type_nm(struct pci_dev *pdev)
 #define MEI_CFG_FW_NM                           \
        .quirk_probe = mei_me_fw_type_nm
 
-static bool mei_me_fw_type_sps_4(struct pci_dev *pdev)
+static bool mei_me_fw_type_sps_4(const struct pci_dev *pdev)
 {
        u32 reg;
        unsigned int devfn;
@@ -1395,7 +1395,7 @@ static bool mei_me_fw_type_sps_4(struct pci_dev *pdev)
  *
  * Return: true in case of SPS firmware
  */
-static bool mei_me_fw_type_sps(struct pci_dev *pdev)
+static bool mei_me_fw_type_sps(const struct pci_dev *pdev)
 {
        u32 reg;
        u32 fw_type;
index 6a8973649c4908f0f7d871d1dd35c8e6c76dc282..560c8ebb17be5bd911ced8b3646ad3c7829a35f3 100644 (file)
@@ -25,7 +25,7 @@
  */
 struct mei_cfg {
        const struct mei_fw_status fw_status;
-       bool (*quirk_probe)(struct pci_dev *pdev);
+       bool (*quirk_probe)(const struct pci_dev *pdev);
        size_t dma_size[DMA_DSCR_NUM];
        u32 fw_ver_supported:1;
        u32 hw_trc_supported:1;