Skip to content

Commit 6429892

Browse files
committed
firmware: turris-mox-rwtm: fix building without CONFIG_KEYS
"struct key" is defined conditionally, so the code referencing it must be made conditional as well: In file included from drivers/firmware/turris-mox-rwtm.c:29: include/linux/turris-signing-key.h: In function 'turris_signing_key_get_dev': include/linux/turris-signing-key.h:26:19: error: invalid use of undefined type 'const struct key' 26 | return key->payload.data[1]; | ^~ Signed-off-by: Arnd Bergmann <[email protected]>
1 parent eece122 commit 6429892

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/turris-signing-key.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
struct device;
1313

14+
#ifdef CONFIG_KEYS
1415
struct turris_signing_key_subtype {
1516
u16 key_size;
1617
u8 data_size;
@@ -29,5 +30,6 @@ static inline struct device *turris_signing_key_get_dev(const struct key *key)
2930
int
3031
devm_turris_signing_key_create(struct device *dev, const struct turris_signing_key_subtype *subtype,
3132
const char *desc);
33+
#endif
3234

3335
#endif /* __TURRIS_SIGNING_KEY_H */

0 commit comments

Comments
 (0)