Skip to content

Commit 97fd880

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
HID: amd_sfh: Use always-managed version of pcim_intx()
pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. All users of amd_mp2_pci_remove(), where pci_intx() is used, call pcim_enable_device(), which is why the driver needs the always-managed version. Replace pci_intx() with pcim_intx(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Basavaraj Natikar <[email protected]>
1 parent 71cf28c commit 97fd880

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/hid/amd-sfh-hid/amd_sfh_pcie.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int amd_sfh_irq_init_v2(struct amd_mp2_dev *privdata)
122122
{
123123
int rc;
124124

125-
pci_intx(privdata->pdev, true);
125+
pcim_intx(privdata->pdev, true);
126126

127127
rc = devm_request_irq(&privdata->pdev->dev, privdata->pdev->irq,
128128
amd_sfh_irq_handler, 0, DRIVER_NAME, privdata);
@@ -248,7 +248,7 @@ static void amd_mp2_pci_remove(void *privdata)
248248
struct amd_mp2_dev *mp2 = privdata;
249249
amd_sfh_hid_client_deinit(privdata);
250250
mp2->mp2_ops->stop_all(mp2);
251-
pci_intx(mp2->pdev, false);
251+
pcim_intx(mp2->pdev, false);
252252
amd_sfh_clear_intr(mp2);
253253
}
254254

drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static void amd_mp2_pci_remove(void *privdata)
289289
sfh_deinit_emp2();
290290
amd_sfh_hid_client_deinit(privdata);
291291
mp2->mp2_ops->stop_all(mp2);
292-
pci_intx(mp2->pdev, false);
292+
pcim_intx(mp2->pdev, false);
293293
amd_sfh_clear_intr(mp2);
294294
}
295295

0 commit comments

Comments
 (0)