From af9c88cb70f6e88a1c9e6c5870c9b889aee67d3d Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Mon, 17 Oct 2022 01:44:10 +0200
Subject: [PATCH 041/463] 8723cs: Port to 6.1-rc1

Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
 drivers/staging/rtl8723cs/os_dep/osdep_service.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723cs/os_dep/osdep_service.c b/drivers/staging/rtl8723cs/os_dep/osdep_service.c
index dd3fb044993c3..0658fdd045ddc 100644
--- a/drivers/staging/rtl8723cs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723cs/os_dep/osdep_service.c
@@ -2863,15 +2863,7 @@ u64 rtw_division64(u64 x, u64 y)
 inline u32 rtw_random32(void)
 {
 #ifdef PLATFORM_LINUX
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))
-	return prandom_u32();
-#elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18))
-	u32 random_int;
-	get_random_bytes(&random_int , 4);
-	return random_int;
-#else
-	return random32();
-#endif
+	return get_random_u32();
 #elif defined(PLATFORM_WINDOWS)
 #error "to be implemented\n"
 #elif defined(PLATFORM_FREEBSD)
-- 
2.46.0

