]> git.hungrycats.org Git - linux/commitdiff
[PATCH] More IEEE1394 updates
authorBen Collins <bcollins@debian.org>
Tue, 4 Mar 2003 08:25:16 +0000 (00:25 -0800)
committerBen Collins <bcollins@debian.org>
Tue, 4 Mar 2003 08:25:16 +0000 (00:25 -0800)
 - 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.

drivers/ieee1394/Makefile
drivers/ieee1394/dv1394.c
drivers/ieee1394/eth1394.c

index 63bba2f25a79def155be681e6975830e5e522e95..c59fb53a3f5190018d80332fea0d0a0a975ba616 100644 (file)
@@ -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
index 09b0a29c62b347e9f9ec5915b935d5aca9209741..d457e39c0446035d9611ee7610d20cc6ed18a536 100644 (file)
@@ -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);
index 32b2e0c5f688e046f7c4869dfd698785166980ea..5b0b99628c1dab5e66f67d318bc12ffd0de9baeb 100644 (file)
@@ -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);