summaryrefslogtreecommitdiff
path: root/drivers/cxl/core
diff options
context:
space:
mode:
authorRobert Richter <rrichter@amd.com>2023-10-18 20:17:13 +0300
committerDan Williams <dan.j.williams@intel.com>2023-10-28 06:13:39 +0300
commite8db0701605bccbeb8d7907ecd2e50f346a725bd (patch)
tree547128ab5918598bdb649284a74bddb7ce2d1b02 /drivers/cxl/core
parentd3970f006f084e5aab5091a865203899259e4d70 (diff)
downloadlinux-e8db0701605bccbeb8d7907ecd2e50f346a725bd.tar.xz
cxl/core/regs: Rework cxl_map_pmu_regs() to use map->dev for devm
struct cxl_register_map carries a @dev parameter for devm operations. Simplify the function interface to use that instead of a separate @dev argument. Signed-off-by: Terry Bowman <terry.bowman@amd.com> Signed-off-by: Robert Richter <rrichter@amd.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20231018171713.1883517-21-rrichter@amd.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/core')
-rw-r--r--drivers/cxl/core/regs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cxl/core/regs.c b/drivers/cxl/core/regs.c
index cac28a656cb8..372786f80955 100644
--- a/drivers/cxl/core/regs.c
+++ b/drivers/cxl/core/regs.c
@@ -386,10 +386,9 @@ int cxl_count_regblock(struct pci_dev *pdev, enum cxl_regloc_type type)
}
EXPORT_SYMBOL_NS_GPL(cxl_count_regblock, CXL);
-int cxl_map_pmu_regs(struct pci_dev *pdev, struct cxl_pmu_regs *regs,
- struct cxl_register_map *map)
+int cxl_map_pmu_regs(struct cxl_register_map *map, struct cxl_pmu_regs *regs)
{
- struct device *dev = &pdev->dev;
+ struct device *dev = map->host;
resource_size_t phys_addr;
phys_addr = map->resource;