summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-i801.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-23 13:11:10 +0200
committerWolfram Sang <wsa@the-dreams.de>2019-08-01 14:55:22 +0200
commit7735eeebd2be26d6d3fa151c85d839d62d710d93 (patch)
tree38734dd58c47ebb8dc9b3c01ed86577bf404bace /drivers/i2c/busses/i2c-i801.c
parenti2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code (diff)
downloadlinux-7735eeebd2be26d6d3fa151c85d839d62d710d93.tar.xz
linux-7735eeebd2be26d6d3fa151c85d839d62d710d93.zip
i2c: busses: Use dev_get_drvdata where possible
Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan <hslester96@gmail.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-i801.c')
-rw-r--r--drivers/i2c/busses/i2c-i801.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index f2956936c3f2..a6469978e735 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1912,8 +1912,7 @@ static int i801_suspend(struct device *dev)
static int i801_resume(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);
i801_enable_host_notify(&priv->adapter);