drivers/pc80/tpm: Silence warnings when CONFIG_TPM is unset
Add some noop device_operations for devices below chip drivers/pc80/tpm in the case CONFIG_TPM is unset. This avoids the warning "... missing read_resources" when probing all devices for resources. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ibc37642a8b5f37b95c648141e03025a04ffa36bc Reviewed-on: https://review.coreboot.org/c/coreboot/+/77386 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
77d8e0bec6
commit
04c49a5e7c
|
@ -832,6 +832,11 @@ static struct device_operations lpc_tpm_ops = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct device_operations noop_tpm_ops = {
|
||||||
|
.read_resources = noop_read_resources,
|
||||||
|
.set_resources = noop_set_resources,
|
||||||
|
};
|
||||||
|
|
||||||
static struct pnp_info pnp_dev_info[] = {
|
static struct pnp_info pnp_dev_info[] = {
|
||||||
{ .flags = PNP_IRQ0 }
|
{ .flags = PNP_IRQ0 }
|
||||||
};
|
};
|
||||||
|
@ -841,6 +846,8 @@ static void enable_dev(struct device *dev)
|
||||||
if (CONFIG(TPM))
|
if (CONFIG(TPM))
|
||||||
pnp_enable_devices(dev, &lpc_tpm_ops,
|
pnp_enable_devices(dev, &lpc_tpm_ops,
|
||||||
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
|
else
|
||||||
|
pnp_enable_devices(dev, &noop_tpm_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct chip_operations drivers_pc80_tpm_ops = {
|
struct chip_operations drivers_pc80_tpm_ops = {
|
||||||
|
|
Loading…
Reference in New Issue