Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangt...@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 netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html