Skip to content

Commit bf4a7c0

Browse files
jgunthorpekonradwilk
authored andcommitted
tpm: xen-tpmfront: Remove the locality sysfs attribute
Upon deeper review it was agreed to remove the driver-unique 'locality' sysfs attribute before it is present in a released kernel. The attribute was introduced in e268395 during the 3.12 merge window, so this patch needs to go in before 3.12 is released. The hope is to have a well defined locality API that all the other locality aware drivers can use, perhaps in 3.13. Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Daniel De Graaf <[email protected]>
1 parent 56be889 commit bf4a7c0

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

drivers/char/tpm/xen-tpmfront.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -142,32 +142,6 @@ static int vtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count)
142142
return length;
143143
}
144144

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-
171145
static const struct file_operations vtpm_ops = {
172146
.owner = THIS_MODULE,
173147
.llseek = no_llseek,
@@ -188,8 +162,6 @@ static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL);
188162
static DEVICE_ATTR(cancel, S_IWUSR | S_IWGRP, NULL, tpm_store_cancel);
189163
static DEVICE_ATTR(durations, S_IRUGO, tpm_show_durations, NULL);
190164
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);
193165

194166
static struct attribute *vtpm_attrs[] = {
195167
&dev_attr_pubek.attr,
@@ -202,7 +174,6 @@ static struct attribute *vtpm_attrs[] = {
202174
&dev_attr_cancel.attr,
203175
&dev_attr_durations.attr,
204176
&dev_attr_timeouts.attr,
205-
&dev_attr_locality.attr,
206177
NULL,
207178
};
208179

0 commit comments

Comments
 (0)