firewire: fix compilation with gcc 3.4
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 27 Jan 2007 15:59:15 +0000 (16:59 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Fri, 9 Mar 2007 21:02:45 +0000 (22:02 +0100)
drivers/firewire/fw-topology.c: In function `report_found_node':
drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field
drivers/firewire/fw-topology.c:345: error: `typeof' applied to a bit-field

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-topology.c

index d3131e7..fc8f1e7 100644 (file)
@@ -342,8 +342,9 @@ report_found_node(struct fw_card *card,
        int b_path = (node->phy_speed == SCODE_BETA);
 
        if (parent != NULL) {
-               node->max_speed = min((u8)parent->max_speed,
-                                     (u8)node->phy_speed);
+               /* min() macro doesn't work here with gcc 3.4 */
+               node->max_speed = parent->max_speed < node->phy_speed ?
+                                       parent->max_speed : node->phy_speed;
                node->b_path = parent->b_path && b_path;
        } else {
                node->max_speed = node->phy_speed;