diff options
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_client.c | 3 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_hid.c | 2 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_hid.h | 2 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 21 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 3 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c | 3 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h | 3 | ||||
-rw-r--r-- | drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h | 3 |
8 files changed, 26 insertions, 14 deletions
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c index 840fd075c56f..c5de0ec4f9d0 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c @@ -1,9 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * AMD SFH Client Layer - * Copyright 2020 Advanced Micro Devices, Inc. + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Nehal Bakulchandra Shah <Nehal-Bakulchandra.Shah@amd.com> * Sandeep Singh <Sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #include <linux/dma-mapping.h> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c index 5ad1e7acd294..2bf97b6ac973 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.c @@ -2,8 +2,10 @@ /* * AMD MP2 Sensors transport driver * + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> * Sandeep Singh <sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #include <linux/hid.h> #include <linux/wait.h> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h index ae2ac9191ba7..c60abd38054c 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h +++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h @@ -2,8 +2,10 @@ /* * AMD MP2 Sensors transport driver * + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> * Sandeep Singh <sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #ifndef AMDSFH_HID_H diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c index 05c007b213f2..2503be0253d3 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c @@ -1,10 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * AMD MP2 PCIe communication driver - * Copyright 2020 Advanced Micro Devices, Inc. + * Copyright 2020-2021 Advanced Micro Devices, Inc. * * Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> * Sandeep Singh <Sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #include <linux/bitops.h> @@ -234,7 +235,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i return -ENOMEM; privdata->pdev = pdev; - pci_set_drvdata(pdev, privdata); + dev_set_drvdata(&pdev->dev, privdata); rc = pcim_enable_device(pdev); if (rc) return rc; @@ -245,10 +246,13 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i privdata->mmio = pcim_iomap_table(pdev)[2]; pci_set_master(pdev); - rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); + rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (rc) { - rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - return rc; + rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); + if (rc) { + dev_err(&pdev->dev, "failed to set DMA mask\n"); + return rc; + } } privdata->cl_data = devm_kzalloc(&pdev->dev, sizeof(struct amdtp_cl_data), GFP_KERNEL); @@ -266,8 +270,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i static int __maybe_unused amd_mp2_pci_resume(struct device *dev) { - struct pci_dev *pdev = to_pci_dev(dev); - struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev); + struct amd_mp2_dev *mp2 = dev_get_drvdata(dev); struct amdtp_cl_data *cl_data = mp2->cl_data; struct amd_mp2_sensor_info info; int i, status; @@ -292,8 +295,7 @@ static int __maybe_unused amd_mp2_pci_resume(struct device *dev) static int __maybe_unused amd_mp2_pci_suspend(struct device *dev) { - struct pci_dev *pdev = to_pci_dev(dev); - struct amd_mp2_dev *mp2 = pci_get_drvdata(pdev); + struct amd_mp2_dev *mp2 = dev_get_drvdata(dev); struct amdtp_cl_data *cl_data = mp2->cl_data; int i, status; @@ -334,3 +336,4 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("Shyam Sundar S K <Shyam-sundar.S-k@amd.com>"); MODULE_AUTHOR("Sandeep Singh <Sandeep.singh@amd.com>"); +MODULE_AUTHOR("Basavaraj Natikar <Basavaraj.Natikar@amd.com>"); diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h index 1ff6f83cb6fd..ae30e059f847 100644 --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * AMD MP2 PCIe communication driver - * Copyright 2020 Advanced Micro Devices, Inc. + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> * Sandeep Singh <Sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #ifndef PCIE_MP2_AMD_H diff --git a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c index 0c3697219382..be41f83b0289 100644 --- a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c +++ b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c @@ -1,9 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * AMD SFH Report Descriptor generator - * Copyright 2020 Advanced Micro Devices, Inc. + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Nehal Bakulchandra Shah <Nehal-Bakulchandra.Shah@amd.com> * Sandeep Singh <sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #include <linux/kernel.h> diff --git a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h index 16f563d1823b..70b1b7abe2c6 100644 --- a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h +++ b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * HID report descriptors, structures and routines - * Copyright 2020 Advanced Micro Devices, Inc. + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> * Sandeep Singh <Sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #ifndef AMD_SFH_HID_DESCRIPTOR_H diff --git a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h index 66d6b26e4708..8d97ca0f9b52 100644 --- a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h +++ b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * HID descriptor stuructures - * Copyright 2020 Advanced Micro Devices, Inc. + * Copyright 2020-2021 Advanced Micro Devices, Inc. * Authors: Nehal Bakulchandra Shah <Nehal-bakulchandra.shah@amd.com> * Sandeep Singh <Sandeep.singh@amd.com> + * Basavaraj Natikar <Basavaraj.Natikar@amd.com> */ #ifndef AMD_SFH_HID_REPORT_DESCRIPTOR_H |