Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: hci_bcm4377: Use generic power management

Switch to the generic PCI power management framework and remove legacy
callbacks like .suspend() and .resume(). With the generic framework, the
standard PCI related work like:
- pci_save/restore_state()
- pci_enable/disable_device()
- pci_set_power_state()
is handled by the PCI core and this driver should implement only
hci_bcm4377 specific operations in its respective callback functions.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Vaibhav Gupta and committed by
Luiz Augusto von Dentz
502a5731 2630bcc8

+7 -4
+7 -4
drivers/bluetooth/hci_bcm4377.c
··· 2416 2416 hdev); 2417 2417 } 2418 2418 2419 - static int bcm4377_suspend(struct pci_dev *pdev, pm_message_t state) 2419 + static int bcm4377_suspend(struct device *dev) 2420 2420 { 2421 + struct pci_dev *pdev = to_pci_dev(dev); 2421 2422 struct bcm4377_data *bcm4377 = pci_get_drvdata(pdev); 2422 2423 int ret; 2423 2424 ··· 2432 2431 return 0; 2433 2432 } 2434 2433 2435 - static int bcm4377_resume(struct pci_dev *pdev) 2434 + static int bcm4377_resume(struct device *dev) 2436 2435 { 2436 + struct pci_dev *pdev = to_pci_dev(dev); 2437 2437 struct bcm4377_data *bcm4377 = pci_get_drvdata(pdev); 2438 2438 2439 2439 iowrite32(BCM4377_BAR0_SLEEP_CONTROL_UNQUIESCE, ··· 2442 2440 2443 2441 return hci_resume_dev(bcm4377->hdev); 2444 2442 } 2443 + 2444 + static DEFINE_SIMPLE_DEV_PM_OPS(bcm4377_ops, bcm4377_suspend, bcm4377_resume); 2445 2445 2446 2446 static const struct dmi_system_id bcm4377_dmi_board_table[] = { 2447 2447 { ··· 2545 2541 .name = "hci_bcm4377", 2546 2542 .id_table = bcm4377_devid_table, 2547 2543 .probe = bcm4377_probe, 2548 - .suspend = bcm4377_suspend, 2549 - .resume = bcm4377_resume, 2544 + .driver.pm = &bcm4377_ops, 2550 2545 }; 2551 2546 module_pci_driver(bcm4377_pci_driver); 2552 2547