diff options
Diffstat (limited to 'drivers/char/tpm/tpm.c')
-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 | ||