tpm/ppi: Constify static struct attribute_group
The only usage of ppi_attr_grp is to put its address in an array of pointers to const struct attribute_group. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
This commit is contained in:
parent
52d0848e1d
commit
90cba8d20f
2 changed files with 3 additions and 1 deletions
|
@ -278,6 +278,8 @@ static void tpm_devs_release(struct device *dev)
|
||||||
{
|
{
|
||||||
struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs);
|
struct tpm_chip *chip = container_of(dev, struct tpm_chip, devs);
|
||||||
|
|
||||||
|
dump_stack();
|
||||||
|
|
||||||
/* release the master device reference */
|
/* release the master device reference */
|
||||||
put_device(&chip->dev);
|
put_device(&chip->dev);
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@ static struct attribute *ppi_attrs[] = {
|
||||||
&dev_attr_tcg_operations.attr,
|
&dev_attr_tcg_operations.attr,
|
||||||
&dev_attr_vs_operations.attr, NULL,
|
&dev_attr_vs_operations.attr, NULL,
|
||||||
};
|
};
|
||||||
static struct attribute_group ppi_attr_grp = {
|
static const struct attribute_group ppi_attr_grp = {
|
||||||
.name = "ppi",
|
.name = "ppi",
|
||||||
.attrs = ppi_attrs
|
.attrs = ppi_attrs
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue