2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

[PATCH] tpm: use to_pci_dev

Changes the container_of calls to 'to_pci_dev' as suggested previously.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Kylene Hall 2005-06-23 22:01:57 -07:00 committed by Linus Torvalds
parent fe3fd48384
commit e2fe90666a

View File

@ -218,7 +218,7 @@ static ssize_t show_pcrs(struct device *dev, struct device_attribute *attr, char
char *str = buf;
struct tpm_chip *chip =
pci_get_drvdata(container_of(dev, struct pci_dev, dev));
pci_get_drvdata(to_pci_dev(dev));
if (chip == NULL)
return -ENODEV;
@ -262,7 +262,7 @@ static ssize_t show_pubek(struct device *dev, struct device_attribute *attr, cha
char *str = buf;
struct tpm_chip *chip =
pci_get_drvdata(container_of(dev, struct pci_dev, dev));
pci_get_drvdata(to_pci_dev(dev));
if (chip == NULL)
return -ENODEV;
@ -344,7 +344,7 @@ static ssize_t show_caps(struct device *dev, struct device_attribute *attr, char
char *str = buf;
struct tpm_chip *chip =
pci_get_drvdata(container_of(dev, struct pci_dev, dev));
pci_get_drvdata(to_pci_dev(dev));
if (chip == NULL)
return -ENODEV;