mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
net/trivial: replace numeric with standard PM state macros
Use standard PM state macros PCI_Dx instead of numeric 0/1/2.. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3b233fe043
commit
1ca01512a2
@ -676,7 +676,7 @@ static int ne2k_pci_resume (struct pci_dev *pdev)
|
||||
struct net_device *dev = pci_get_drvdata (pdev);
|
||||
int rc;
|
||||
|
||||
pci_set_power_state(pdev, 0);
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
||||
rc = pci_enable_device(pdev);
|
||||
|
@ -4364,7 +4364,7 @@ static int be_resume(struct pci_dev *pdev)
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
pci_set_power_state(pdev, 0);
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
||||
/* tell fw we're ready to fire cmds */
|
||||
@ -4460,7 +4460,7 @@ static pci_ers_result_t be_eeh_reset(struct pci_dev *pdev)
|
||||
return PCI_ERS_RESULT_DISCONNECT;
|
||||
|
||||
pci_set_master(pdev);
|
||||
pci_set_power_state(pdev, 0);
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
||||
/* Check if card is ok and fw is ready */
|
||||
|
@ -3069,7 +3069,7 @@ static int e100_resume(struct pci_dev *pdev)
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
/* ack any pending wake events, disable PME */
|
||||
pci_enable_wake(pdev, 0, 0);
|
||||
pci_enable_wake(pdev, PCI_D0, 0);
|
||||
|
||||
/* disable reverse auto-negotiation */
|
||||
if (nic->phy == phy_82552_v) {
|
||||
@ -3160,7 +3160,7 @@ static void e100_io_resume(struct pci_dev *pdev)
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
||||
/* ack any pending wake events, disable PME */
|
||||
pci_enable_wake(pdev, 0, 0);
|
||||
pci_enable_wake(pdev, PCI_D0, 0);
|
||||
|
||||
netif_device_attach(netdev);
|
||||
if (netif_running(netdev)) {
|
||||
|
@ -3299,7 +3299,7 @@ static int myri10ge_resume(struct pci_dev *pdev)
|
||||
if (mgp == NULL)
|
||||
return -EINVAL;
|
||||
netdev = mgp->dev;
|
||||
pci_set_power_state(pdev, 0); /* zeros conf space as a side effect */
|
||||
pci_set_power_state(pdev, PCI_D0); /* zeros conf space as a side effect */
|
||||
msleep(5); /* give card time to respond */
|
||||
pci_read_config_word(mgp->pdev, PCI_VENDOR_ID, &vendor);
|
||||
if (vendor == 0xffff) {
|
||||
|
@ -1817,7 +1817,7 @@ static int cp_set_eeprom(struct net_device *dev,
|
||||
/* Put the board into D3cold state and wait for WakeUp signal */
|
||||
static void cp_set_d3_state (struct cp_private *cp)
|
||||
{
|
||||
pci_enable_wake (cp->pdev, 0, 1); /* Enable PME# generation */
|
||||
pci_enable_wake(cp->pdev, PCI_D0, 1); /* Enable PME# generation */
|
||||
pci_set_power_state (cp->pdev, PCI_D3hot);
|
||||
}
|
||||
|
||||
|
@ -372,7 +372,7 @@ static int tlan_resume(struct pci_dev *pdev)
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
pci_enable_wake(pdev, 0, 0);
|
||||
pci_enable_wake(pdev, PCI_D0, 0);
|
||||
netif_device_attach(dev);
|
||||
|
||||
if (netif_running(dev))
|
||||
|
@ -3211,7 +3211,7 @@ static int velocity_resume(struct device *dev)
|
||||
velocity_set_power_state(vptr, PCI_D0);
|
||||
|
||||
if (vptr->pdev) {
|
||||
pci_enable_wake(vptr->pdev, 0, 0);
|
||||
pci_enable_wake(vptr->pdev, PCI_D0, 0);
|
||||
pci_restore_state(vptr->pdev);
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
|
||||
struct net_device *dev = priv->ndev;
|
||||
int err;
|
||||
|
||||
pci_set_power_state(pdev, 0);
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
err = pci_enable_device(pdev);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: pci_enable_device failed on resume\n",
|
||||
|
Loading…
Reference in New Issue
Block a user