[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b08d4f25c027f69f5bba4c8ffed79c83a5e5e684.1451211133.git.geliangtang@163.com>
Date: Sun, 27 Dec 2015 18:46:02 +0800
From: Geliang Tang <geliangtang@....com>
To: Michael Buesch <m@...s.ch>
Cc: Geliang Tang <geliangtang@....com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 6/9] ssb: use to_pci_dev()
Use to_pci_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@....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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists