* [PATCH 1/2] crypto: atmel-sha204a - drop __maybe_unused and of_match_ptr
@ 2026-05-09 10:11 Thorsten Blum
2026-05-09 10:11 ` [PATCH 2/2] crypto: atmel-ecc - drop CONFIG_OF guard " Thorsten Blum
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-05-09 10:11 UTC (permalink / raw)
To: Thorsten Blum, Herbert Xu, David S. Miller, Nicolas Ferre,
Alexandre Belloni, Claudiu Beznea
Cc: linux-crypto, linux-arm-kernel, linux-kernel
Since MODULE_DEVICE_TABLE() keeps atmel_sha204a_dt_ids referenced, drop
the unnecessary __maybe_unused annotation. Also remove of_match_ptr()
because OF matching is stubbed out when CONFIG_OF=n.
Reformat atmel_sha204a_dt_ids to silence a checkpatch error and
atmel_sha204a_id for consistency.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/crypto/atmel-sha204a.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index ed7d69bf6890..6e6ac4770416 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -207,17 +207,17 @@ static void atmel_sha204a_remove(struct i2c_client *client)
kfree((void *)i2c_priv->hwrng.priv);
}
-static const struct of_device_id atmel_sha204a_dt_ids[] __maybe_unused = {
+static const struct of_device_id atmel_sha204a_dt_ids[] = {
{ .compatible = "atmel,atsha204", .data = &atsha204_quality },
{ .compatible = "atmel,atsha204a", },
- { /* sentinel */ }
+ { }
};
MODULE_DEVICE_TABLE(of, atmel_sha204a_dt_ids);
static const struct i2c_device_id atmel_sha204a_id[] = {
{ "atsha204", (kernel_ulong_t)&atsha204_quality },
{ "atsha204a" },
- { /* sentinel */ }
+ { }
};
MODULE_DEVICE_TABLE(i2c, atmel_sha204a_id);
@@ -227,7 +227,7 @@ static struct i2c_driver atmel_sha204a_driver = {
.id_table = atmel_sha204a_id,
.driver.name = "atmel-sha204a",
- .driver.of_match_table = of_match_ptr(atmel_sha204a_dt_ids),
+ .driver.of_match_table = atmel_sha204a_dt_ids,
};
static int __init atmel_sha204a_init(void)
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 2/2] crypto: atmel-ecc - drop CONFIG_OF guard and of_match_ptr
2026-05-09 10:11 [PATCH 1/2] crypto: atmel-sha204a - drop __maybe_unused and of_match_ptr Thorsten Blum
@ 2026-05-09 10:11 ` Thorsten Blum
0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Blum @ 2026-05-09 10:11 UTC (permalink / raw)
To: Thorsten Blum, Herbert Xu, David S. Miller, Nicolas Ferre,
Alexandre Belloni, Claudiu Beznea
Cc: linux-crypto, linux-arm-kernel, linux-kernel
Drop the CONFIG_OF preprocessor guard and remove of_match_ptr() because
OF matching is stubbed out when CONFIG_OF=n.
Reformat atmel_ecc_dt_ids for consistency.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/crypto/atmel-ecc.c | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/atmel-ecc.c b/drivers/crypto/atmel-ecc.c
index 3738a4eb8701..c15096676ac5 100644
--- a/drivers/crypto/atmel-ecc.c
+++ b/drivers/crypto/atmel-ecc.c
@@ -368,18 +368,12 @@ static void atmel_ecc_remove(struct i2c_client *client)
spin_unlock(&driver_data.i2c_list_lock);
}
-#ifdef CONFIG_OF
static const struct of_device_id atmel_ecc_dt_ids[] = {
- {
- .compatible = "atmel,atecc508a",
- }, {
- .compatible = "atmel,atecc608b",
- }, {
- /* sentinel */
- }
+ { .compatible = "atmel,atecc508a", },
+ { .compatible = "atmel,atecc608b", },
+ { }
};
MODULE_DEVICE_TABLE(of, atmel_ecc_dt_ids);
-#endif
static const struct i2c_device_id atmel_ecc_id[] = {
{ "atecc508a" },
@@ -391,7 +385,7 @@ MODULE_DEVICE_TABLE(i2c, atmel_ecc_id);
static struct i2c_driver atmel_ecc_driver = {
.driver = {
.name = "atmel-ecc",
- .of_match_table = of_match_ptr(atmel_ecc_dt_ids),
+ .of_match_table = atmel_ecc_dt_ids,
},
.probe = atmel_ecc_probe,
.remove = atmel_ecc_remove,
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-09 10:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 10:11 [PATCH 1/2] crypto: atmel-sha204a - drop __maybe_unused and of_match_ptr Thorsten Blum
2026-05-09 10:11 ` [PATCH 2/2] crypto: atmel-ecc - drop CONFIG_OF guard " Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox