git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[pandora-kernel.git]
/
drivers
/
net
/
hamradio
/
yam.c
diff --git
a/drivers/net/hamradio/yam.c
b/drivers/net/hamradio/yam.c
index
6d74f08
..
ee3ea4f
100644
(file)
--- a/
drivers/net/hamradio/yam.c
+++ b/
drivers/net/hamradio/yam.c
@@
-50,6
+50,7
@@
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/bitops.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/bitops.h>
+#include <linux/random.h>
#include <asm/io.h>
#include <asm/system.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include <asm/system.h>
#include <linux/interrupt.h>
@@
-566,14
+567,6
@@
static void yam_start_tx(struct net_device *dev, struct yam_port *yp)
ptt_on(dev);
}
ptt_on(dev);
}
-static unsigned short random_seed;
-
-static inline unsigned short random_num(void)
-{
- random_seed = 28629 * random_seed + 157;
- return random_seed;
-}
-
static void yam_arbitrate(struct net_device *dev)
{
struct yam_port *yp = netdev_priv(dev);
static void yam_arbitrate(struct net_device *dev)
{
struct yam_port *yp = netdev_priv(dev);
@@
-600,7
+593,7
@@
static void yam_arbitrate(struct net_device *dev)
yp->slotcnt = yp->slot / 10;
/* is random > persist ? */
yp->slotcnt = yp->slot / 10;
/* is random > persist ? */
- if ((random
_num
() % 256) > yp->pers)
+ if ((random
32
() % 256) > yp->pers)
return;
yam_start_tx(dev, yp);
return;
yam_start_tx(dev, yp);
@@
-804,7
+797,7
@@
static int yam_info_open(struct inode *inode, struct file *file)
return seq_open(file, &yam_seqops);
}
return seq_open(file, &yam_seqops);
}
-static struct file_operations yam_info_fops = {
+static
const
struct file_operations yam_info_fops = {
.owner = THIS_MODULE,
.open = yam_info_open,
.read = seq_read,
.owner = THIS_MODULE,
.open = yam_info_open,
.read = seq_read,