Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207936
b: refs/heads/master
c: 3c4108c
h: refs/heads/master
v: v3
  • Loading branch information
Feng Tang authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 1dfc50f commit 8c8f2f4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 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: 06c77e21ae7c199435097116b8212b0761fc8ba8
refs/heads/master: 3c4108c82f7769fcd265dc77a5bb0c6d8bcea25f
31 changes: 22 additions & 9 deletions trunk/drivers/serial/mfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,25 +1217,38 @@ static struct uart_driver serial_hsu_reg = {
#ifdef CONFIG_PM
static int serial_hsu_suspend(struct pci_dev *pdev, pm_message_t state)
{
void *priv = pci_get_drvdata(pdev);
struct uart_hsu_port *up;

up = pci_get_drvdata(pdev);
if (!up)
return 0;

uart_suspend_port(&serial_hsu_reg, &up->port);
/* Make sure this is not the internal dma controller */
if (priv && (pdev->device != 0x081E)) {
up = priv;
uart_suspend_port(&serial_hsu_reg, &up->port);
}

pci_save_state(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
return 0;
}

static int serial_hsu_resume(struct pci_dev *pdev)
{
void *priv = pci_get_drvdata(pdev);
struct uart_hsu_port *up;
int ret;

up = pci_get_drvdata(pdev);
if (!up)
return 0;
uart_resume_port(&serial_hsu_reg, &up->port);
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);

ret = pci_enable_device(pdev);
if (ret)
dev_warn(&pdev->dev,
"HSU: can't re-enable device, try to continue\n");

if (priv && (pdev->device != 0x081E)) {
up = priv;
uart_resume_port(&serial_hsu_reg, &up->port);
}
return 0;
}
#else
Expand Down

0 comments on commit 8c8f2f4

Please sign in to comment.