Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ca01512 authored by Yijing Wang's avatar Yijing Wang Committed by David S. Miller
Browse files

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: default avatarYijing Wang <wangyijing@huawei.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b233fe0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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 */
+2 −2
Original line number Diff line number Diff line
@@ -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)) {
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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);
}

Loading