Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286206
b: refs/heads/master
c: 7e9e7fa
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds authored and John W. Linville committed Jan 17, 2012
1 parent ce57ed1 commit 266dc62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d5869e78f4c9d32f834dadefbb7dcb3c9d4d85f
refs/heads/master: 7e9e7fa414e47fccc6127f23bc866cbcc7e27dcb
38 changes: 3 additions & 35 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,13 +1128,6 @@ static int __devinit brcms_bcma_probe(struct bcma_device *pdev)
return 0;
}

static int brcms_pci_suspend(struct pci_dev *pdev)
{
pci_save_state(pdev);
pci_disable_device(pdev);
return pci_set_power_state(pdev, PCI_D3hot);
}

static int brcms_suspend(struct bcma_device *pdev)
{
struct brcms_info *wl;
Expand All @@ -1153,40 +1146,15 @@ static int brcms_suspend(struct bcma_device *pdev)
wl->pub->hw_up = false;
spin_unlock_bh(&wl->lock);

/* temporarily do suspend ourselves */
return brcms_pci_suspend(pdev->bus->host_pci);
}

static int brcms_pci_resume(struct pci_dev *pdev)
{
int err = 0;
uint val;

err = pci_set_power_state(pdev, PCI_D0);
if (err)
return err;

pci_restore_state(pdev);

err = pci_enable_device(pdev);
if (err)
return err;

pci_set_master(pdev);

pci_read_config_dword(pdev, 0x40, &val);
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
pr_debug("brcms_suspend ok\n");

return 0;
}

static int brcms_resume(struct bcma_device *pdev)
{
/*
* just do pci resume for now until bcma supports it.
*/
return brcms_pci_resume(pdev->bus->host_pci);
pr_debug("brcms_resume ok\n");
return 0;
}

static struct bcma_driver brcms_bcma_driver = {
Expand Down

0 comments on commit 266dc62

Please sign in to comment.