aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKylene Hall <kjhall@us.ibm.com>2005-06-23 22:01:57 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 00:05:26 -0700
commite2fe90666a84e6a11c541424dfa9eec20cfe5fc1 (patch)
treef98ba19517fa71c726a11b9a27daf8be7e961717 /drivers
parentfe3fd48384af79e7619d3c6b0a020f801ef63c3b (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tpm/tpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index f7fa3c3a51b..39e82314d67 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -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;