netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] atm: solos-pci: use to_pci_dev()
@ 2015-12-27 10:45 Geliang Tang
       [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ 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] 5+ messages in thread

end of thread, other threads:[~2015-12-31  8:30 UTC | newest]

Thread overview: 5+ 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
     [not found] ` <baf4e17c993f197cc31f8a0e5736ee8a558ba44c.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
2015-12-27 10:46   ` [PATCH 5/9] ipw2x00: sdhci-pci: " Geliang Tang
     [not found]     ` <896b7d080610c5417a2f09a3bf9d0e20636fcc52.1451211133.git.geliangtang-9Onoh4P/yGk@public.gmane.org>
2015-12-31  8:30       ` Kalle Valo
2015-12-27 10:46 ` [PATCH 6/9] ssb: " Geliang Tang
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;
as well as URLs for NNTP newsgroup(s).