diff options
author | Ben Collins <bcollins@ubuntu.com> | 2006-06-12 18:15:31 -0400 |
---|---|---|
committer | Ben Collins <bcollins@ubuntu.com> | 2006-06-12 18:15:31 -0400 |
commit | 6737231ead125c7cee7ce4d3a74179bdac085529 (patch) | |
tree | f0c996c8c48d07398c47ada5a2dacdcbf0800770 /drivers/ieee1394/eth1394.c | |
parent | e269d276792684a13ab0d9acd8c024ec7d6c5f4d (diff) |
ieee1394: add preprocessor constant for invalid csr address
Replace occurrences of the magic value ~(u64)0 for invalid
CSR address spaces by a named constant for better readability.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/ieee1394/eth1394.c')
-rw-r--r-- | drivers/ieee1394/eth1394.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index 3ec3b13e4917..cf80fed6163b 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -367,7 +367,7 @@ static int eth1394_probe(struct device *dev) | |||
367 | spin_lock_init(&node_info->pdg.lock); | 367 | spin_lock_init(&node_info->pdg.lock); |
368 | INIT_LIST_HEAD(&node_info->pdg.list); | 368 | INIT_LIST_HEAD(&node_info->pdg.list); |
369 | node_info->pdg.sz = 0; | 369 | node_info->pdg.sz = 0; |
370 | node_info->fifo = ETHER1394_INVALID_ADDR; | 370 | node_info->fifo = CSR1212_INVALID_ADDR_SPACE; |
371 | 371 | ||
372 | ud->device.driver_data = node_info; | 372 | ud->device.driver_data = node_info; |
373 | new_node->ud = ud; | 373 | new_node->ud = ud; |
@@ -566,13 +566,11 @@ static void ether1394_add_host (struct hpsb_host *host) | |||
566 | if (!(host->config_roms & HPSB_CONFIG_ROM_ENTRY_IP1394)) | 566 | if (!(host->config_roms & HPSB_CONFIG_ROM_ENTRY_IP1394)) |
567 | return; | 567 | return; |
568 | 568 | ||
569 | fifo_addr = hpsb_allocate_and_register_addrspace(ð1394_highlevel, | 569 | fifo_addr = hpsb_allocate_and_register_addrspace( |
570 | host, | 570 | ð1394_highlevel, host, &addr_ops, |
571 | &addr_ops, | 571 | ETHER1394_REGION_ADDR_LEN, ETHER1394_REGION_ADDR_LEN, |
572 | ETHER1394_REGION_ADDR_LEN, | 572 | CSR1212_INVALID_ADDR_SPACE, CSR1212_INVALID_ADDR_SPACE); |
573 | ETHER1394_REGION_ADDR_LEN, | 573 | if (fifo_addr == CSR1212_INVALID_ADDR_SPACE) |
574 | -1, -1); | ||
575 | if (fifo_addr == ~0ULL) | ||
576 | goto out; | 574 | goto out; |
577 | 575 | ||
578 | /* We should really have our own alloc_hpsbdev() function in | 576 | /* We should really have our own alloc_hpsbdev() function in |
@@ -1686,7 +1684,7 @@ static int ether1394_tx (struct sk_buff *skb, struct net_device *dev) | |||
1686 | goto fail; | 1684 | goto fail; |
1687 | } | 1685 | } |
1688 | node_info = (struct eth1394_node_info*)node->ud->device.driver_data; | 1686 | node_info = (struct eth1394_node_info*)node->ud->device.driver_data; |
1689 | if (node_info->fifo == ETHER1394_INVALID_ADDR) { | 1687 | if (node_info->fifo == CSR1212_INVALID_ADDR_SPACE) { |
1690 | ret = -EAGAIN; | 1688 | ret = -EAGAIN; |
1691 | goto fail; | 1689 | goto fail; |
1692 | } | 1690 | } |