X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fnet%2Fhamradio%2Fyam.c;h=ee3ea4fa729f370a79567dbb3432f2d5b3d37b10;hp=6d74f08720d5cf0e53656dfb5a00dfa03579f235;hb=9654640d0af8f2de40ff3807d3695109d3463f54;hpb=7e23772f414cdbfb2a08aed237d6e926bb1cb728 diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 6d74f08720d5..ee3ea4fa729f 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -566,14 +567,6 @@ static void yam_start_tx(struct net_device *dev, struct yam_port *yp) 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); @@ -600,7 +593,7 @@ static void yam_arbitrate(struct net_device *dev) yp->slotcnt = yp->slot / 10; /* is random > persist ? */ - if ((random_num() % 256) > yp->pers) + if ((random32() % 256) > yp->pers) 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); } -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,