From: Linus Walleij Date: Thu, 18 Jun 2015 14:46:34 +0000 (+0200) Subject: ARM: ep93xx: toss the device ID into the entropy pool X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e8a7d2bb93f8b713b0536ef6f86b745b288fa96f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM: ep93xx: toss the device ID into the entropy pool It doesn't hurt to add this random stuff into the entropy pool as is custom to do with device-unique numbers. Reviewed-by: H Hartley Sweeten Signed-off-by: Linus Walleij --- diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 5e2151bcc0c5..c393b1b0310d 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -862,6 +863,12 @@ static const char __init *ep93xx_get_soc_id(void) if (id != id2) return "invalid"; + /* Toss the unique ID into the entropy pool */ + add_device_randomness(&id2, 4); + add_device_randomness(&id3, 4); + add_device_randomness(&id4, 4); + add_device_randomness(&id5, 4); + snprintf(ep93xx_soc_id, sizeof(ep93xx_soc_id), "%08x%08x%08x%08x", id2, id3, id4, id5);