Skip to content

Commit b242973

Browse files
rikardfalkebornherbertx
authored andcommitted
hwrng: nomadik - Constify nmk_rng_ids[]
nmk_rng_ids[] is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 652 216 4 872 368 drivers/char/hw_random/nomadik-rng.o After: text data bss dec hex filename 676 192 4 872 368 drivers/char/hw_random/nomadik-rng.o Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent d4f6d92 commit b242973

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/char/hw_random/nomadik-rng.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int nmk_rng_remove(struct amba_device *dev)
7676
return 0;
7777
}
7878

79-
static struct amba_id nmk_rng_ids[] = {
79+
static const struct amba_id nmk_rng_ids[] = {
8080
{
8181
.id = 0x000805e1,
8282
.mask = 0x000fffff, /* top bits are rev and cfg: accept all */

0 commit comments

Comments
 (0)