Re: [PATCH 4/9] mmc: sdhci-pci: use to_pci_dev()

2015-12-28 Thread Ulf Hansson
On 27 December 2015 at 11:46, Geliang Tang  wrote:
> Use to_pci_dev() instead of open-coding it.
>
> Signed-off-by: Geliang Tang 

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-pci-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c 
> b/drivers/mmc/host/sdhci-pci-core.c
> index 08f4a9f..cc851b0 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -1464,7 +1464,7 @@ static int sdhci_pci_resume(struct device *dev)
>
>  static int sdhci_pci_runtime_suspend(struct device *dev)
>  {
> -   struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
> +   struct pci_dev *pdev = to_pci_dev(dev);
> struct sdhci_pci_chip *chip;
> struct sdhci_pci_slot *slot;
> int i, ret;
> @@ -1500,7 +1500,7 @@ err_pci_runtime_suspend:
>
>  static int sdhci_pci_runtime_resume(struct device *dev)
>  {
> -   struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
> +   struct pci_dev *pdev = to_pci_dev(dev);
> struct sdhci_pci_chip *chip;
> struct sdhci_pci_slot *slot;
> int i, ret;
> --
> 2.5.0
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/9] mmc: sdhci-pci: use to_pci_dev()

2015-12-27 Thread Geliang Tang
Use to_pci_dev() instead of open-coding it.

Signed-off-by: Geliang Tang 
---
 drivers/mmc/host/sdhci-pci-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci-core.c 
b/drivers/mmc/host/sdhci-pci-core.c
index 08f4a9f..cc851b0 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -1464,7 +1464,7 @@ static int sdhci_pci_resume(struct device *dev)
 
 static int sdhci_pci_runtime_suspend(struct device *dev)
 {
-   struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+   struct pci_dev *pdev = to_pci_dev(dev);
struct sdhci_pci_chip *chip;
struct sdhci_pci_slot *slot;
int i, ret;
@@ -1500,7 +1500,7 @@ err_pci_runtime_suspend:
 
 static int sdhci_pci_runtime_resume(struct device *dev)
 {
-   struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+   struct pci_dev *pdev = to_pci_dev(dev);
struct sdhci_pci_chip *chip;
struct sdhci_pci_slot *slot;
int i, ret;
-- 
2.5.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/