public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] atm: solos-pci: use to_pci_dev()
@ 2015-12-27 10:45 Geliang Tang
  2015-12-27 10:45 ` [PATCH 2/9] drm/gma500: " Geliang Tang
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Geliang Tang @ 2015-12-27 10:45 UTC (permalink / raw)
  To: Chas Williams; +Cc: Geliang Tang, linux-atm-general, netdev, linux-kernel

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



^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-01-04  6:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-27 10:45 [PATCH 1/9] atm: solos-pci: use to_pci_dev() Geliang Tang
2015-12-27 10:45 ` [PATCH 2/9] drm/gma500: " Geliang Tang
2016-01-04  6:59   ` Daniel Vetter
2015-12-27 10:45 ` [PATCH 3/9] i2c: designware: " Geliang Tang
2015-12-27 12:40   ` Andy Shevchenko
2016-01-03 18:54   ` Wolfram Sang
2015-12-27 10:46 ` [PATCH 4/9] mmc: sdhci-pci: " Geliang Tang
2015-12-28 13:29   ` Ulf Hansson
2015-12-27 10:46 ` [PATCH 5/9] ipw2x00: " Geliang Tang
2015-12-31  8:30   ` Kalle Valo
2015-12-27 10:46 ` [PATCH 6/9] ssb: " Geliang Tang
2015-12-27 10:46 ` [PATCH 7/9] serial: 8250_pci: " Geliang Tang
2015-12-27 12:39   ` Andy Shevchenko
2015-12-27 14:29     ` [PATCH 7/9 v2] " Geliang Tang
2015-12-27 10:46 ` [PATCH 8/9] vme: vme_ca91cx42.c: " Geliang Tang
2015-12-27 16:46   ` Martyn Welch
2015-12-27 10:46 ` [PATCH 9/9] devres: " Geliang Tang
2015-12-28 16:19   ` Tejun Heo
2015-12-29 20:47 ` [PATCH 1/9] atm: solos-pci: " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox