mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
i2c: designware: use to_pci_dev()
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
e2e5a2c618
commit
238c44a70c
1 changed files with 2 additions and 2 deletions
|
@ -162,7 +162,7 @@ static struct dw_pci_controller dw_pci_controllers[] = {
|
|||
#ifdef CONFIG_PM
|
||||
static int i2c_dw_pci_suspend(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
|
||||
i2c_dw_disable(pci_get_drvdata(pdev));
|
||||
return 0;
|
||||
|
@ -170,7 +170,7 @@ static int i2c_dw_pci_suspend(struct device *dev)
|
|||
|
||||
static int i2c_dw_pci_resume(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
|
||||
return i2c_dw_init(pci_get_drvdata(pdev));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue