Commit e2fe9066 authored by Kylene Hall's avatar Kylene Hall Committed by Linus Torvalds

[PATCH] tpm: use to_pci_dev

Changes the container_of calls to 'to_pci_dev' as suggested previously.
Signed-off-by: default avatarKylene Hall <kjhall@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fe3fd483
...@@ -218,7 +218,7 @@ static ssize_t show_pcrs(struct device *dev, struct device_attribute *attr, char ...@@ -218,7 +218,7 @@ static ssize_t show_pcrs(struct device *dev, struct device_attribute *attr, char
char *str = buf; char *str = buf;
struct tpm_chip *chip = struct tpm_chip *chip =
pci_get_drvdata(container_of(dev, struct pci_dev, dev)); pci_get_drvdata(to_pci_dev(dev));
if (chip == NULL) if (chip == NULL)
return -ENODEV; return -ENODEV;
...@@ -262,7 +262,7 @@ static ssize_t show_pubek(struct device *dev, struct device_attribute *attr, cha ...@@ -262,7 +262,7 @@ static ssize_t show_pubek(struct device *dev, struct device_attribute *attr, cha
char *str = buf; char *str = buf;
struct tpm_chip *chip = struct tpm_chip *chip =
pci_get_drvdata(container_of(dev, struct pci_dev, dev)); pci_get_drvdata(to_pci_dev(dev));
if (chip == NULL) if (chip == NULL)
return -ENODEV; return -ENODEV;
...@@ -344,7 +344,7 @@ static ssize_t show_caps(struct device *dev, struct device_attribute *attr, char ...@@ -344,7 +344,7 @@ static ssize_t show_caps(struct device *dev, struct device_attribute *attr, char
char *str = buf; char *str = buf;
struct tpm_chip *chip = struct tpm_chip *chip =
pci_get_drvdata(container_of(dev, struct pci_dev, dev)); pci_get_drvdata(to_pci_dev(dev));
if (chip == NULL) if (chip == NULL)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment