Skip to content

Commit

Permalink
platform/x86: ISST: Change PCI device macros
Browse files Browse the repository at this point in the history
Use PCI_VDEVICE and PCI_DEVICE_DATA macros. No functional changes are
expected.

Signed-off-by: Srinivas Pandruvada <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
  • Loading branch information
spandruvada authored and jwrdegoede committed Dec 7, 2020
1 parent 761f0ee commit 7c88ab5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions drivers/platform/x86/intel_speed_select_if/isst_if_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#ifndef __ISST_IF_COMMON_H
#define __ISST_IF_COMMON_H

#define INTEL_RAPL_PRIO_DEVID_0 0x3451
#define INTEL_CFG_MBOX_DEVID_0 0x3459
#define PCI_DEVICE_ID_INTEL_RAPL_PRIO_DEVID_0 0x3451
#define PCI_DEVICE_ID_INTEL_CFG_MBOX_DEVID_0 0x3459

#define INTEL_RAPL_PRIO_DEVID_1 0x3251
#define INTEL_CFG_MBOX_DEVID_1 0x3259
#define PCI_DEVICE_ID_INTEL_RAPL_PRIO_DEVID_1 0x3251
#define PCI_DEVICE_ID_INTEL_CFG_MBOX_DEVID_1 0x3259

/*
* Validate maximum commands in a single request.
Expand Down
4 changes: 2 additions & 2 deletions drivers/platform/x86/intel_speed_select_if/isst_if_mbox_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ static long isst_if_mbox_proc_cmd(u8 *cmd_ptr, int *write_only, int resume)
}

static const struct pci_device_id isst_if_mbox_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_CFG_MBOX_DEVID_0)},
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_CFG_MBOX_DEVID_1)},
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CFG_MBOX_DEVID_0)},
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CFG_MBOX_DEVID_1)},
{ 0 },
};
MODULE_DEVICE_TABLE(pci, isst_if_mbox_ids);
Expand Down
6 changes: 2 additions & 4 deletions drivers/platform/x86/intel_speed_select_if/isst_if_mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ static long isst_if_mmio_rd_wr(u8 *cmd_ptr, int *write_only, int resume)
}

static const struct pci_device_id isst_if_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_RAPL_PRIO_DEVID_0),
.driver_data = (kernel_ulong_t)&mmio_range_devid_0},
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, INTEL_RAPL_PRIO_DEVID_1),
.driver_data = (kernel_ulong_t)&mmio_range_devid_1},
{ PCI_DEVICE_DATA(INTEL, RAPL_PRIO_DEVID_0, &mmio_range_devid_0)},
{ PCI_DEVICE_DATA(INTEL, RAPL_PRIO_DEVID_1, &mmio_range_devid_1)},
{ 0 },
};
MODULE_DEVICE_TABLE(pci, isst_if_ids);
Expand Down

0 comments on commit 7c88ab5

Please sign in to comment.