Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Collins <bcollins@debian.org>2003-03-04 00:25:16 -0800
committerBen Collins <bcollins@debian.org>2003-03-04 00:25:16 -0800
commitbf50d11502b341502025128b40608dd3acc542d4 (patch)
treed4451701440f5b1858eec50ca2cb26db12532b19
parent13d677738ea94bf50028af87bcd02984ced09dd0 (diff)
[PATCH] More IEEE1394 updates
- Cleanup Makefile. - Fix potentional crash in dv1394 module unload. - Why does ARM's memcpy not return void*? Oh well, work around it in eth1394 by not expecting standard behavior.
-rw-r--r--drivers/ieee1394/Makefile7
-rw-r--r--drivers/ieee1394/dv1394.c4
-rw-r--r--drivers/ieee1394/eth1394.c8
3 files changed, 6 insertions, 13 deletions
diff --git a/drivers/ieee1394/Makefile b/drivers/ieee1394/Makefile
index 63bba2f25a79..c59fb53a3f51 100644
--- a/drivers/ieee1394/Makefile
+++ b/drivers/ieee1394/Makefile
@@ -18,13 +18,6 @@ obj-$(CONFIG_IEEE1394_CMP) += cmp.o
clean-files := oui.c
-ieee1394.o: $(ieee1394-objs)
- $(LD) $(LDFLAGS) -r -o $@ $(ieee1394-objs)
-
-ifeq ($(obj),)
-obj = .
-endif
-
$(obj)/oui.o: $(obj)/oui.c
$(obj)/oui.c: $(obj)/oui.db $(obj)/oui2c.sh
$(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $(obj)/oui.c
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index 09b0a29c62b3..d457e39c0446 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -2703,7 +2703,7 @@ static void dv1394_remove_host (struct hpsb_host *host)
struct ti_ohci *ohci;
struct video_card *video = NULL;
unsigned long flags;
- struct list_head *lh;
+ struct list_head *lh, *templh;
char buf[32];
int n;
@@ -2717,7 +2717,7 @@ static void dv1394_remove_host (struct hpsb_host *host)
/* find the corresponding video_cards */
spin_lock_irqsave(&dv1394_cards_lock, flags);
if(!list_empty(&dv1394_cards)) {
- list_for_each(lh, &dv1394_cards) {
+ list_for_each_safe(lh, templh, &dv1394_cards) {
video = list_entry(lh, struct video_card, list);
if((video->id >> 2) == ohci->id)
dv1394_un_init(video);
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index 32b2e0c5f688..5b0b99628c1d 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -78,7 +78,7 @@
printk(KERN_ERR fmt, ## args)
static char version[] __devinitdata =
- "$Rev: 801 $ Ben Collins <bcollins@debian.org>";
+ "$Rev: 806 $ Ben Collins <bcollins@debian.org>";
/* Our ieee1394 highlevel driver */
#define ETHER1394_DRIVER_NAME "ether1394"
@@ -221,7 +221,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev
unsigned char arp_data[2*(dev->addr_len+4)];
/* Copy the main data that we need */
- arp_ptr = memcpy (arp_data, arp_ptr + sizeof(struct arphdr), sizeof (arp_data));
+ memcpy (arp_data, arp_ptr + sizeof(struct arphdr), sizeof (arp_data));
/* Extend the buffer enough for our new header */
skb_put (skb, sizeof (struct eth1394_arp) -
@@ -229,7 +229,7 @@ static inline void ether1394_arp_to_1394arp (struct sk_buff *skb, struct net_dev
#define PROCESS_MEMBER(ptr,val,len) \
memcpy (val, ptr, len); ptr += len
- arp_ptr += arp1394->hw_addr_len;
+ arp_ptr = arp_data + arp1394->hw_addr_len;
PROCESS_MEMBER (arp_ptr, &arp1394->sip, arp1394->ip_addr_len);
arp_ptr += arp1394->hw_addr_len;
PROCESS_MEMBER (arp_ptr, &arp1394->tip, arp1394->ip_addr_len);
@@ -529,7 +529,7 @@ static inline unsigned short ether1394_parse_encap (struct sk_buff *skb, struct
spin_unlock_irqrestore (&priv->lock, flags);
#define PROCESS_MEMBER(ptr,val,len) \
- ptr = memcpy (ptr, val, len) + len
+ memcpy (ptr, val, len); ptr += len
PROCESS_MEMBER (arp_ptr, src_hw, dev->addr_len);
PROCESS_MEMBER (arp_ptr, &arp1394.sip, 4);
PROCESS_MEMBER (arp_ptr, dest_hw, dev->addr_len);