patch-2.3.99-pre7 linux/drivers/net/de4x5.c
Next file: linux/drivers/net/de600.c
Previous file: linux/drivers/net/cs89x0.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Wed May 10 16:56:42 2000
- Orig file:
v2.3.99-pre6/linux/drivers/net/de4x5.c
- Orig date:
Wed Apr 26 16:34:08 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/net/de4x5.c linux/drivers/net/de4x5.c
@@ -4356,12 +4356,11 @@
static void
srom_address(u_int command, u_long addr, u_char offset)
{
- int i;
- char a;
+ int i, a;
- a = (char)(offset << 2);
+ a = offset << 2;
for (i=0; i<6; i++, a <<= 1) {
- srom_latch(command | ((a < 0) ? DT_IN : 0), addr);
+ srom_latch(command | ((a & 0x80) ? DT_IN : 0), addr);
}
de4x5_us_delay(1);
@@ -5904,13 +5903,12 @@
{
struct net_device *new;
- new = (struct net_device *)kmalloc(sizeof(struct net_device)+8, GFP_KERNEL);
+ new = (struct net_device *)kmalloc(sizeof(struct net_device), GFP_KERNEL);
if (new == NULL) {
printk("de4x5.c: Device not initialised, insufficient memory\n");
return NULL;
} else {
- memset((char *)new, 0, sizeof(struct net_device)+8);
- new->name = (char *)(new + 1);
+ memset((char *)new, 0, sizeof(struct net_device));
new->base_addr = iobase; /* assign the io address */
new->init = init; /* initialisation routine */
}
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])