firewire: clean up includes
[linux-2.6-block.git] / drivers / firewire / fw-topology.c
index 8dd6703b55cd00702f64f84272d3d523d7112ec6..6d0ea1bb7e2303b608d7e459d747e0be75a39b91 100644 (file)
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#include <linux/module.h>
-#include <linux/wait.h>
+#include <linux/bug.h>
 #include <linux/errno.h>
-#include <asm/bug.h>
+#include <linux/jiffies.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/string.h>
+
+#include <asm/atomic.h>
 #include <asm/system.h>
-#include "fw-transaction.h"
+
 #include "fw-topology.h"
+#include "fw-transaction.h"
 
 #define SELF_ID_PHY_ID(q)              (((q) >> 24) & 0x3f)
 #define SELF_ID_EXTENDED(q)            (((q) >> 23) & 0x01)
@@ -314,9 +322,8 @@ typedef void (*fw_node_callback_t)(struct fw_card * card,
                                   struct fw_node * node,
                                   struct fw_node * parent);
 
-static void
-for_each_fw_node(struct fw_card *card, struct fw_node *root,
-                fw_node_callback_t callback)
+static void for_each_fw_node(struct fw_card *card, struct fw_node *root,
+                            fw_node_callback_t callback)
 {
        struct list_head list;
        struct fw_node *node, *next, *child, *parent;
@@ -349,9 +356,8 @@ for_each_fw_node(struct fw_card *card, struct fw_node *root,
                fw_node_put(node);
 }
 
-static void
-report_lost_node(struct fw_card *card,
-                struct fw_node *node, struct fw_node *parent)
+static void report_lost_node(struct fw_card *card,
+                            struct fw_node *node, struct fw_node *parent)
 {
        fw_node_event(card, node, FW_NODE_DESTROYED);
        fw_node_put(node);
@@ -360,9 +366,8 @@ report_lost_node(struct fw_card *card,
        card->bm_retries = 0;
 }
 
-static void
-report_found_node(struct fw_card *card,
-                 struct fw_node *node, struct fw_node *parent)
+static void report_found_node(struct fw_card *card,
+                             struct fw_node *node, struct fw_node *parent)
 {
        int b_path = (node->phy_speed == SCODE_BETA);
 
@@ -415,8 +420,7 @@ static void move_tree(struct fw_node *node0, struct fw_node *node1, int port)
  * found, lost or updated.  Update the nodes in the card topology tree
  * as we go.
  */
-static void
-update_tree(struct fw_card *card, struct fw_node *root)
+static void update_tree(struct fw_card *card, struct fw_node *root)
 {
        struct list_head list0, list1;
        struct fw_node *node0, *node1, *next1;
@@ -497,8 +501,8 @@ update_tree(struct fw_card *card, struct fw_node *root)
        }
 }
 
-static void
-update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count)
+static void update_topology_map(struct fw_card *card,
+                               u32 *self_ids, int self_id_count)
 {
        int node_count;
 
@@ -510,10 +514,8 @@ update_topology_map(struct fw_card *card, u32 *self_ids, int self_id_count)
        fw_compute_block_crc(card->topology_map);
 }
 
-void
-fw_core_handle_bus_reset(struct fw_card *card,
-                        int node_id, int generation,
-                        int self_id_count, u32 * self_ids)
+void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
+                             int self_id_count, u32 *self_ids)
 {
        struct fw_node *local_node;
        unsigned long flags;
@@ -532,6 +534,7 @@ fw_core_handle_bus_reset(struct fw_card *card,
 
        spin_lock_irqsave(&card->lock, flags);
 
+       card->broadcast_channel_allocated = false;
        card->node_id = node_id;
        /*
         * Update node_id before generation to prevent anybody from using