Commit 811a6e18 authored by Jean Delvare's avatar Jean Delvare Committed by Wolfram Sang

i2c: i801: Simplify the suspend callback

We don't actually need to derive the PCI device from the device
structure, as we already have a pointer to it in our private data
structure.
Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 66d402e2
......@@ -1958,10 +1958,9 @@ static void i801_shutdown(struct pci_dev *dev)
#ifdef CONFIG_PM_SLEEP
static int i801_suspend(struct device *dev)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
struct i801_priv *priv = pci_get_drvdata(pci_dev);
struct i801_priv *priv = dev_get_drvdata(dev);
pci_write_config_byte(pci_dev, SMBHSTCFG, priv->original_hstcfg);
pci_write_config_byte(priv->pci_dev, SMBHSTCFG, priv->original_hstcfg);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment