Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298344
| From | Geliang Tang <geliangtang@163.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/9] atm: solos-pci: use to_pci_dev() |
| Date | 2015-12-27 11:50 +0100 |
| Message-ID | <qKh3H-5KU-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[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
csiph-web