diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/tpm/xen-tpmfront.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c index 7a7929ba2658..06189e55b4e5 100644 --- a/drivers/char/tpm/xen-tpmfront.c +++ b/drivers/char/tpm/xen-tpmfront.c | |||
@@ -142,32 +142,6 @@ static int vtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count) | |||
142 | return length; | 142 | return length; |
143 | } | 143 | } |
144 | 144 | ||
145 | ssize_t tpm_show_locality(struct device *dev, struct device_attribute *attr, | ||
146 | char *buf) | ||
147 | { | ||
148 | struct tpm_chip *chip = dev_get_drvdata(dev); | ||
149 | struct tpm_private *priv = TPM_VPRIV(chip); | ||
150 | u8 locality = priv->shr->locality; | ||
151 | |||
152 | return sprintf(buf, "%d\n", locality); | ||
153 | } | ||
154 | |||
155 | ssize_t tpm_store_locality(struct device *dev, struct device_attribute *attr, | ||
156 | const char *buf, size_t len) | ||
157 | { | ||
158 | struct tpm_chip *chip = dev_get_drvdata(dev); | ||
159 | struct tpm_private *priv = TPM_VPRIV(chip); | ||
160 | u8 val; | ||
161 | |||
162 | int rv = kstrtou8(buf, 0, &val); | ||
163 | if (rv) | ||
164 | return rv; | ||
165 | |||
166 | priv->shr->locality = val; | ||
167 | |||
168 | return len; | ||
169 | } | ||
170 | |||
171 | static const struct file_operations vtpm_ops = { | 145 | static const struct file_operations vtpm_ops = { |
172 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
173 | .llseek = no_llseek, | 147 | .llseek = no_llseek, |
@@ -188,8 +162,6 @@ static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); | |||
188 | static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); | 162 | static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel); |
189 | static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); | 163 | static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL); |
190 | static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); | 164 | static DEVICE_ATTR(timeouts, S_IRUGO, tpm_show_timeouts, NULL); |
191 | static DEVICE_ATTR(locality, S_IRUGO | S_IWUSR, tpm_show_locality, | ||
192 | tpm_store_locality); | ||
193 | 165 | ||
194 | static struct attribute *vtpm_attrs[] = { | 166 | static struct attribute *vtpm_attrs[] = { |
195 | &dev_attr_pubek.attr, | 167 | &dev_attr_pubek.attr, |
@@ -202,7 +174,6 @@ static struct attribute *vtpm_attrs[] = { | |||
202 | &dev_attr_cancel.attr, | 174 | &dev_attr_cancel.attr, |
203 | &dev_attr_durations.attr, | 175 | &dev_attr_durations.attr, |
204 | &dev_attr_timeouts.attr, | 176 | &dev_attr_timeouts.attr, |
205 | &dev_attr_locality.attr, | ||
206 | NULL, | 177 | NULL, |
207 | }; | 178 | }; |
208 | 179 | ||
@@ -210,8 +181,6 @@ static struct attribute_group vtpm_attr_grp = { | |||
210 | .attrs = vtpm_attrs, | 181 | .attrs = vtpm_attrs, |
211 | }; | 182 | }; |
212 | 183 | ||
213 | #define TPM_LONG_TIMEOUT (10 * 60 * HZ) | ||
214 | |||
215 | static const struct tpm_vendor_specific tpm_vtpm = { | 184 | static const struct tpm_vendor_specific tpm_vtpm = { |
216 | .status = vtpm_status, | 185 | .status = vtpm_status, |
217 | .recv = vtpm_recv, | 186 | .recv = vtpm_recv, |
@@ -224,11 +193,6 @@ static const struct tpm_vendor_specific tpm_vtpm = { | |||
224 | .miscdev = { | 193 | .miscdev = { |
225 | .fops = &vtpm_ops, | 194 | .fops = &vtpm_ops, |
226 | }, | 195 | }, |
227 | .duration = { | ||
228 | TPM_LONG_TIMEOUT, | ||
229 | TPM_LONG_TIMEOUT, | ||
230 | TPM_LONG_TIMEOUT, | ||
231 | }, | ||
232 | }; | 196 | }; |
233 | 197 | ||
234 | static irqreturn_t tpmif_interrupt(int dummy, void *dev_id) | 198 | static irqreturn_t tpmif_interrupt(int dummy, void *dev_id) |