Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298344 > unrolled thread
| Started by | Geliang Tang <geliangtang@163.com> |
|---|---|
| First post | 2015-12-27 11:50 +0100 |
| Last post | 2015-12-29 21:50 +0100 |
| Articles | 13 — 7 participants |
Back to article view | Back to linux.kernel
[PATCH 1/9] atm: solos-pci: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
[PATCH 8/9] vme: vme_ca91cx42.c: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
Re: [PATCH 8/9] vme: vme_ca91cx42.c: use to_pci_dev() Martyn Welch <martyn@welchs.me.uk> - 2015-12-28 03:50 +0100
[PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
Re: [PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev() Kalle Valo <kvalo@codeaurora.org> - 2015-12-31 09:40 +0100
[PATCH 9/9] devres: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
Re: [PATCH 9/9] devres: use to_pci_dev() Tejun Heo <tj@kernel.org> - 2015-12-28 17:30 +0100
[PATCH 3/9] i2c: designware: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
Re: [PATCH 3/9] i2c: designware: use to_pci_dev() Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-27 13:50 +0100
[PATCH 4/9] mmc: sdhci-pci: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
Re: [PATCH 4/9] mmc: sdhci-pci: use to_pci_dev() Ulf Hansson <ulf.hansson@linaro.org> - 2015-12-28 14:30 +0100
[PATCH 6/9] ssb: use to_pci_dev() Geliang Tang <geliangtang@163.com> - 2015-12-27 11:50 +0100
Re: [PATCH 1/9] atm: solos-pci: use to_pci_dev() David Miller <davem@davemloft.net> - 2015-12-29 21:50 +0100
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 1/9] atm: solos-pci: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-3@gated-at.bofh.it> |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/atm/solos-pci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index 0c2b4ba0..6ac2b2b 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -525,7 +525,7 @@ struct geos_gpio_attr {
static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
- struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct pci_dev *pdev = to_pci_dev(dev);
struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
struct solos_card *card = pci_get_drvdata(pdev);
uint32_t data32;
@@ -551,7 +551,7 @@ static ssize_t geos_gpio_store(struct device *dev, struct device_attribute *attr
static ssize_t geos_gpio_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
- struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct pci_dev *pdev = to_pci_dev(dev);
struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
struct solos_card *card = pci_get_drvdata(pdev);
uint32_t data32;
@@ -565,7 +565,7 @@ static ssize_t geos_gpio_show(struct device *dev, struct device_attribute *attr,
static ssize_t hardware_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
- struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
+ struct pci_dev *pdev = to_pci_dev(dev);
struct geos_gpio_attr *gattr = container_of(attr, struct geos_gpio_attr, attr);
struct solos_card *card = pci_get_drvdata(pdev);
uint32_t data32;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 8/9] vme: vme_ca91cx42.c: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-7@gated-at.bofh.it> |
| In reply to | #1298344 |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/vme/bridges/vme_ca91cx42.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
index b79a74a..5fbeab3 100644
--- a/drivers/vme/bridges/vme_ca91cx42.c
+++ b/drivers/vme/bridges/vme_ca91cx42.c
@@ -202,7 +202,7 @@ static int ca91cx42_irq_init(struct vme_bridge *ca91cx42_bridge)
bridge = ca91cx42_bridge->driver_priv;
/* Need pdev */
- pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev);
+ pdev = to_pci_dev(ca91cx42_bridge->parent);
INIT_LIST_HEAD(&ca91cx42_bridge->vme_error_handlers);
@@ -293,8 +293,7 @@ static void ca91cx42_irq_set(struct vme_bridge *ca91cx42_bridge, int level,
iowrite32(tmp, bridge->base + LINT_EN);
if ((state == 0) && (sync != 0)) {
- pdev = container_of(ca91cx42_bridge->parent, struct pci_dev,
- dev);
+ pdev = to_pci_dev(ca91cx42_bridge->parent);
synchronize_irq(pdev->irq);
}
@@ -518,7 +517,7 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
dev_err(ca91cx42_bridge->parent, "Dev entry NULL\n");
return -EINVAL;
}
- pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev);
+ pdev = to_pci_dev(ca91cx42_bridge->parent);
existing_size = (unsigned long long)(image->bus_resource.end -
image->bus_resource.start);
@@ -1519,7 +1518,7 @@ static void *ca91cx42_alloc_consistent(struct device *parent, size_t size,
struct pci_dev *pdev;
/* Find pci_dev container of dev */
- pdev = container_of(parent, struct pci_dev, dev);
+ pdev = to_pci_dev(parent);
return pci_alloc_consistent(pdev, size, dma);
}
@@ -1530,7 +1529,7 @@ static void ca91cx42_free_consistent(struct device *parent, size_t size,
struct pci_dev *pdev;
/* Find pci_dev container of dev */
- pdev = container_of(parent, struct pci_dev, dev);
+ pdev = to_pci_dev(parent);
pci_free_consistent(pdev, size, vaddr, dma);
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Martyn Welch <martyn@welchs.me.uk> |
|---|---|
| Date | 2015-12-28 03:50 +0100 |
| Subject | Re: [PATCH 8/9] vme: vme_ca91cx42.c: use to_pci_dev() |
| Message-ID | <qKw3i-3Io-727@gated-at.bofh.it> |
| In reply to | #1298345 |
On 27/12/15 10:46, Geliang Tang wrote:
> Use to_pci_dev() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
Acked-by: Martyn Welch <martyn@welchs.me.uk>
> ---
> drivers/vme/bridges/vme_ca91cx42.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c
> index b79a74a..5fbeab3 100644
> --- a/drivers/vme/bridges/vme_ca91cx42.c
> +++ b/drivers/vme/bridges/vme_ca91cx42.c
> @@ -202,7 +202,7 @@ static int ca91cx42_irq_init(struct vme_bridge *ca91cx42_bridge)
> bridge = ca91cx42_bridge->driver_priv;
>
> /* Need pdev */
> - pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev);
> + pdev = to_pci_dev(ca91cx42_bridge->parent);
>
> INIT_LIST_HEAD(&ca91cx42_bridge->vme_error_handlers);
>
> @@ -293,8 +293,7 @@ static void ca91cx42_irq_set(struct vme_bridge *ca91cx42_bridge, int level,
> iowrite32(tmp, bridge->base + LINT_EN);
>
> if ((state == 0) && (sync != 0)) {
> - pdev = container_of(ca91cx42_bridge->parent, struct pci_dev,
> - dev);
> + pdev = to_pci_dev(ca91cx42_bridge->parent);
>
> synchronize_irq(pdev->irq);
> }
> @@ -518,7 +517,7 @@ static int ca91cx42_alloc_resource(struct vme_master_resource *image,
> dev_err(ca91cx42_bridge->parent, "Dev entry NULL\n");
> return -EINVAL;
> }
> - pdev = container_of(ca91cx42_bridge->parent, struct pci_dev, dev);
> + pdev = to_pci_dev(ca91cx42_bridge->parent);
>
> existing_size = (unsigned long long)(image->bus_resource.end -
> image->bus_resource.start);
> @@ -1519,7 +1518,7 @@ static void *ca91cx42_alloc_consistent(struct device *parent, size_t size,
> struct pci_dev *pdev;
>
> /* Find pci_dev container of dev */
> - pdev = container_of(parent, struct pci_dev, dev);
> + pdev = to_pci_dev(parent);
>
> return pci_alloc_consistent(pdev, size, dma);
> }
> @@ -1530,7 +1529,7 @@ static void ca91cx42_free_consistent(struct device *parent, size_t size,
> struct pci_dev *pdev;
>
> /* Find pci_dev container of dev */
> - pdev = container_of(parent, struct pci_dev, dev);
> + pdev = to_pci_dev(parent);
>
> pci_free_consistent(pdev, size, vaddr, dma);
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-9@gated-at.bofh.it> |
| In reply to | #1298344 |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 36818c7..121294f 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -3514,7 +3514,7 @@ static void ipw2100_msg_free(struct ipw2100_priv *priv)
static ssize_t show_pci(struct device *d, struct device_attribute *attr,
char *buf)
{
- struct pci_dev *pci_dev = container_of(d, struct pci_dev, dev);
+ struct pci_dev *pci_dev = to_pci_dev(d);
char *out = buf;
int i, j;
u32 val;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kalle Valo <kvalo@codeaurora.org> |
|---|---|
| Date | 2015-12-31 09:40 +0100 |
| Subject | Re: [PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev() |
| Message-ID | <qLGW5-25b-1@gated-at.bofh.it> |
| In reply to | #1298346 |
Geliang Tang <geliangtang@163.com> writes: > Use to_pci_dev() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> The title is wrong, it should be just "ipw2x00: use to_pci_dev()". And please state clearly to what tree you are planning to submit these. I only saw this patch 5, not rest of the patches, so I have no clue what's going to happen with this patchset. Please resend. -- Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 9/9] devres: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-11@gated-at.bofh.it> |
| In reply to | #1298344 |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
lib/devres.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/devres.c b/lib/devres.c
index 8c85672..cb1464c 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -236,7 +236,7 @@ struct pcim_iomap_devres {
static void pcim_iomap_release(struct device *gendev, void *res)
{
- struct pci_dev *dev = container_of(gendev, struct pci_dev, dev);
+ struct pci_dev *dev = to_pci_dev(gendev);
struct pcim_iomap_devres *this = res;
int i;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-12-28 17:30 +0100 |
| Subject | Re: [PATCH 9/9] devres: use to_pci_dev() |
| Message-ID | <qKIQj-4yb-17@gated-at.bofh.it> |
| In reply to | #1298347 |
On Sun, Dec 27, 2015 at 06:46:05PM +0800, Geliang Tang wrote: > Use to_pci_dev() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> Acked-by: Tejun Heo <tj@kernel.org> Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 3/9] i2c: designware: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-13@gated-at.bofh.it> |
| In reply to | #1298344 |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 1543d35d..7368be0 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -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));
}
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2015-12-27 13:50 +0100 |
| Subject | Re: [PATCH 3/9] i2c: designware: use to_pci_dev() |
| Message-ID | <qKiWd-73r-473@gated-at.bofh.it> |
| In reply to | #1298348 |
On Sun, Dec 27, 2015 at 12:45 PM, Geliang Tang <geliangtang@163.com> wrote:
> Use to_pci_dev() instead of open-coding it.
>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
> ---
> drivers/i2c/busses/i2c-designware-pcidrv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index 1543d35d..7368be0 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -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));
> }
> --
> 2.5.0
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 4/9] mmc: sdhci-pci: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-17@gated-at.bofh.it> |
| In reply to | #1298344 |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2015-12-28 14:30 +0100 |
| Subject | Re: [PATCH 4/9] mmc: sdhci-pci: use to_pci_dev() |
| Message-ID | <qKG26-2xG-11@gated-at.bofh.it> |
| In reply to | #1298349 |
On 27 December 2015 at 11:46, Geliang Tang <geliangtang@163.com> wrote:
> Use to_pci_dev() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Date | 2015-12-27 11:50 +0100 |
| Subject | [PATCH 6/9] ssb: use to_pci_dev() |
| Message-ID | <qKh3H-5KU-15@gated-at.bofh.it> |
| In reply to | #1298344 |
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
---
drivers/ssb/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c
index 0f28c08..67428f4 100644
--- a/drivers/ssb/pci.c
+++ b/drivers/ssb/pci.c
@@ -1130,7 +1130,7 @@ static ssize_t ssb_pci_attr_sprom_show(struct device *pcidev,
struct device_attribute *attr,
char *buf)
{
- struct pci_dev *pdev = container_of(pcidev, struct pci_dev, dev);
+ struct pci_dev *pdev = to_pci_dev(pcidev);
struct ssb_bus *bus;
bus = ssb_pci_dev_to_bus(pdev);
@@ -1144,7 +1144,7 @@ static ssize_t ssb_pci_attr_sprom_store(struct device *pcidev,
struct device_attribute *attr,
const char *buf, size_t count)
{
- struct pci_dev *pdev = container_of(pcidev, struct pci_dev, dev);
+ struct pci_dev *pdev = to_pci_dev(pcidev);
struct ssb_bus *bus;
bus = ssb_pci_dev_to_bus(pdev);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-12-29 21:50 +0100 |
| Message-ID | <qL9ns-5p3-17@gated-at.bofh.it> |
| In reply to | #1298344 |
From: Geliang Tang <geliangtang@163.com> Date: Sun, 27 Dec 2015 18:45:57 +0800 > Use to_pci_dev() instead of open-coding it. > > Signed-off-by: Geliang Tang <geliangtang@163.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web