From b5e3e74daafe67f371973e8484ac7492075701b6 Mon Sep 17 00:00:00 2001 From: Patrik Jakobsson Date: Thu, 31 Dec 2015 14:22:35 +0100 Subject: [PATCH] facetimehd: Hack the suspend/resume handlers This is a temporary fix for suspend/resume. It'll unload and reload the entire driver on suspend/resume. This will obviously not work if the device is not closed. Also, remove the PCI_VDEVICE macro. Signed-off-by: Patrik Jakobsson --- fthd_drv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fthd_drv.c b/fthd_drv.c index 981e658..f8377f6 100644 --- a/fthd_drv.c +++ b/fthd_drv.c @@ -518,17 +518,21 @@ fail_work: #ifdef CONFIG_PM static int fthd_pci_suspend(struct pci_dev *pdev, pm_message_t state) { + fthd_pci_remove(pdev); + return 0; } static int fthd_pci_resume(struct pci_dev *pdev) { + fthd_pci_probe(pdev, NULL); + return 0; } #endif /* CONFIG_PM */ static const struct pci_device_id fthd_pci_id_table[] = { - { PCI_VDEVICE(BROADCOM, 0x1570), 4 }, + { PCI_DEVICE(0x14e4, 0x1570), 4 }, { 0, }, };