cec0faaffa38b3b1740bf594701d36cc136a5a5f
[openwrt/staging/xback.git] /
1 From 608da34369e1d306cb95a9eca5bb5f930243b654 Mon Sep 17 00:00:00 2001
2 From: Scovotto Davide <scovottodavide@gmail.com>
3 Date: Wed, 20 Apr 2022 17:22:17 +0200
4 Subject: [PATCH] tpm_tis_spi_main: Force probe routine to run
5 synchronously with driver and device registration when IMA is enabled
6
7 Co-authored-by: Alberto Solavagione <albertosolavagione30@gmail.com>
8 Co-developed-by: Alberto Solavagione <albertosolavagione30@gmail.com>
9 Signed-off-by: Alberto Solavagione <albertosolavagione30@gmail.com>
10 Signed-off-by: Davide Scovotto <scovottodavide@gmail.com>
11 ---
12 drivers/char/tpm/tpm_tis_spi_main.c | 4 ++++
13 1 file changed, 4 insertions(+)
14
15 --- a/drivers/char/tpm/tpm_tis_spi_main.c
16 +++ b/drivers/char/tpm/tpm_tis_spi_main.c
17 @@ -252,7 +252,11 @@ static struct spi_driver tpm_tis_spi_dri
18 .pm = &tpm_tis_pm,
19 .of_match_table = of_match_ptr(of_tis_spi_match),
20 .acpi_match_table = ACPI_PTR(acpi_tis_spi_match),
21 +#ifdef CONFIG_IMA
22 + .probe_type = PROBE_FORCE_SYNCHRONOUS,
23 +#else
24 .probe_type = PROBE_PREFER_ASYNCHRONOUS,
25 +#endif
26 },
27 .probe = tpm_tis_spi_driver_probe,
28 .remove = tpm_tis_spi_remove,