aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 51bbd582f16c..9ba56aa26a1b 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -38,6 +38,7 @@
38#include <linux/delay.h> 38#include <linux/delay.h>
39#include <linux/ethtool.h> 39#include <linux/ethtool.h>
40#include <linux/netdevice.h> 40#include <linux/netdevice.h>
41#include <linux/log2.h>
41#include "../8390.h" 42#include "../8390.h"
42 43
43#include <pcmcia/cs_types.h> 44#include <pcmcia/cs_types.h>
@@ -1484,8 +1485,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg,
1484 window_size = 32 * 1024; 1485 window_size = 32 * 1024;
1485 1486
1486 /* Make sure it's a power of two. */ 1487 /* Make sure it's a power of two. */
1487 while ((window_size & (window_size - 1)) != 0) 1488 window_size = roundup_pow_of_two(window_size);
1488 window_size += window_size & ~(window_size - 1);
1489 1489
1490 /* Allocate a memory window */ 1490 /* Allocate a memory window */
1491 req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM|WIN_ENABLE; 1491 req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM|WIN_ENABLE;