diff options
author | Kylene Hall <kjhall@us.ibm.com> | 2005-06-24 01:01:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:05:26 -0400 |
commit | e2fe90666a84e6a11c541424dfa9eec20cfe5fc1 (patch) | |
tree | f98ba19517fa71c726a11b9a27daf8be7e961717 /drivers | |
parent | fe3fd48384af79e7619d3c6b0a020f801ef63c3b (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index f7fa3c3a51bd..39e82314d67f 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 | |||
218 | char *str = buf; | 218 | char *str = buf; |
219 | 219 | ||
220 | struct tpm_chip *chip = | 220 | struct tpm_chip *chip = |
221 | pci_get_drvdata(container_of(dev, struct pci_dev, dev)); | 221 | pci_get_drvdata(to_pci_dev(dev)); |
222 | if (chip == NULL) | 222 | if (chip == NULL) |
223 | return -ENODEV; | 223 | return -ENODEV; |
224 | 224 | ||
@@ -262,7 +262,7 @@ static ssize_t show_pubek(struct device *dev, struct device_attribute *attr, cha | |||
262 | char *str = buf; | 262 | char *str = buf; |
263 | 263 | ||
264 | struct tpm_chip *chip = | 264 | struct tpm_chip *chip = |
265 | pci_get_drvdata(container_of(dev, struct pci_dev, dev)); | 265 | pci_get_drvdata(to_pci_dev(dev)); |
266 | if (chip == NULL) | 266 | if (chip == NULL) |
267 | return -ENODEV; | 267 | return -ENODEV; |
268 | 268 | ||
@@ -344,7 +344,7 @@ static ssize_t show_caps(struct device *dev, struct device_attribute *attr, char | |||
344 | char *str = buf; | 344 | char *str = buf; |
345 | 345 | ||
346 | struct tpm_chip *chip = | 346 | struct tpm_chip *chip = |
347 | pci_get_drvdata(container_of(dev, struct pci_dev, dev)); | 347 | pci_get_drvdata(to_pci_dev(dev)); |
348 | if (chip == NULL) | 348 | if (chip == NULL) |
349 | return -ENODEV; | 349 | return -ENODEV; |
350 | 350 | ||