linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / char / random.c
index 2726a41..05c343f 100644 (file)
  */
 
 #include <linux/utsname.h>
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/major.h>
@@ -416,7 +417,7 @@ static struct entropy_store input_pool = {
        .poolinfo = &poolinfo_table[0],
        .name = "input",
        .limit = 1,
-       .lock = __SPIN_LOCK_UNLOCKED(&input_pool.lock),
+       .lock = SPIN_LOCK_UNLOCKED,
        .pool = input_pool_data
 };
 
@@ -425,7 +426,7 @@ static struct entropy_store blocking_pool = {
        .name = "blocking",
        .limit = 1,
        .pull = &input_pool,
-       .lock = __SPIN_LOCK_UNLOCKED(&blocking_pool.lock),
+       .lock = SPIN_LOCK_UNLOCKED,
        .pool = blocking_pool_data
 };
 
@@ -433,7 +434,7 @@ static struct entropy_store nonblocking_pool = {
        .poolinfo = &poolinfo_table[1],
        .name = "nonblocking",
        .pull = &input_pool,
-       .lock = __SPIN_LOCK_UNLOCKED(&nonblocking_pool.lock),
+       .lock = SPIN_LOCK_UNLOCKED,
        .pool = nonblocking_pool_data
 };
 
@@ -1583,6 +1584,7 @@ u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dpo
 
        return twothirdsMD4Transform(daddr, hash);
 }
+EXPORT_SYMBOL(secure_ipv6_port_ephemeral);
 #endif
 
 #if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
@@ -1630,18 +1632,13 @@ EXPORT_SYMBOL(secure_dccp_sequence_number);
  */
 unsigned int get_random_int(void)
 {
-       unsigned int val = 0;
-
-#ifdef CONFIG_X86_HAS_TSC
-       rdtscl(val);
-#endif
        /*
         * Use IP's RNG. It suits our purpose perfectly: it re-keys itself
         * every second, from the entropy pool (and thus creates a limited
         * drain on it), and uses halfMD4Transform within the second. We
         * also mix it with jiffies and the PID:
         */
-       return secure_ip_id(current->pid + jiffies + (int)val);
+       return secure_ip_id(current->pid + jiffies);
 }
 
 /*