uwb: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:34 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:43 +0000 (18:28 -0700)
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/uwb/rsv.c

index 0b0d8bce842e0313889048644021fec1195870fc..f4ae05f78c42bc5c20753af530cac27331d92ba7 100644 (file)
@@ -231,7 +231,7 @@ void uwb_rsv_backoff_win_increment(struct uwb_rc *rc)
                return;
 
        bow->window <<= 1;
-       bow->n = random32() & (bow->window - 1);
+       bow->n = prandom_u32() & (bow->window - 1);
        dev_dbg(dev, "new_window=%d, n=%d\n: ", bow->window, bow->n);
 
        /* reset the timer associated variables */
@@ -557,7 +557,7 @@ int uwb_rsv_establish(struct uwb_rsv *rsv)
        if (ret)
                goto out;
 
-       rsv->tiebreaker = random32() & 1;
+       rsv->tiebreaker = prandom_u32() & 1;
        /* get available mas bitmap */
        uwb_drp_available(rc, &available);