static int ssb_pcihost_suspend(struct device *d) { struct pci_dev *dev = to_pci_dev(d); struct ssb_bus *ssb = pci_get_drvdata(dev); int err; #if 1 /* in RHEL */ int i, wakeup_path = 0; #endif err = ssb_bus_suspend(ssb); if (err) return err; pci_save_state(dev); pci_disable_device(dev); /* if there is a wakeup enabled child device on ssb bus, enable pci wakeup posibility. */ #if 0 /* Not in RHEL */ device_set_wakeup_enable(d, d->power.wakeup_path); #else for (i = 0; i < ssb->nr_devices; i++) { struct ssb_device *sdev = &ssb->devices[i]; if (sdev && sdev->dev && sdev->dev->power.should_wakeup) { wakeup_path = 1; break; } } device_set_wakeup_enable(d, wakeup_path); #endif pci_prepare_to_sleep(dev); return 0; }
static int ssb_pcihost_suspend(struct pci_dev *dev, pm_message_t state) { struct ssb_bus *ssb = pci_get_drvdata(dev); int err; err = ssb_bus_suspend(ssb); if (err) return err; pci_save_state(dev); pci_disable_device(dev); pci_set_power_state(dev, pci_choose_state(dev, state)); return 0; }
static int b43_pcmcia_suspend(struct pcmcia_device *dev) { struct ssb_bus *ssb = dev->priv; return ssb_bus_suspend(ssb); }