Skip to content

Commit

Permalink
[PATCH] tpm: use to_pci_dev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kylene Hall authored and Linus Torvalds committed Jun 24, 2005
1 parent fe3fd48 commit e2fe906
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit e2fe906

Please sign in to comment.