diff options
Diffstat (limited to 'drivers/ieee1394/eth1394.c')
-rw-r--r-- | drivers/ieee1394/eth1394.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index c9e92d85c893..30fa0d43a43a 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -88,9 +88,6 @@ | |||
88 | printk(KERN_ERR "%s:%s[%d]: " fmt "\n", driver_name, __FUNCTION__, __LINE__, ## args) | 88 | printk(KERN_ERR "%s:%s[%d]: " fmt "\n", driver_name, __FUNCTION__, __LINE__, ## args) |
89 | #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) | 89 | #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__) |
90 | 90 | ||
91 | static char version[] __devinitdata = | ||
92 | "$Rev: 1312 $ Ben Collins <bcollins@debian.org>"; | ||
93 | |||
94 | struct fragment_info { | 91 | struct fragment_info { |
95 | struct list_head list; | 92 | struct list_head list; |
96 | int offset; | 93 | int offset; |
@@ -355,12 +352,12 @@ static int eth1394_probe(struct device *dev) | |||
355 | if (!hi) | 352 | if (!hi) |
356 | return -ENOENT; | 353 | return -ENOENT; |
357 | 354 | ||
358 | new_node = kmalloc(sizeof(struct eth1394_node_ref), | 355 | new_node = kmalloc(sizeof(*new_node), |
359 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); | 356 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); |
360 | if (!new_node) | 357 | if (!new_node) |
361 | return -ENOMEM; | 358 | return -ENOMEM; |
362 | 359 | ||
363 | node_info = kmalloc(sizeof(struct eth1394_node_info), | 360 | node_info = kmalloc(sizeof(*node_info), |
364 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); | 361 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); |
365 | if (!node_info) { | 362 | if (!node_info) { |
366 | kfree(new_node); | 363 | kfree(new_node); |
@@ -436,12 +433,12 @@ static int eth1394_update(struct unit_directory *ud) | |||
436 | node = eth1394_find_node(&priv->ip_node_list, ud); | 433 | node = eth1394_find_node(&priv->ip_node_list, ud); |
437 | 434 | ||
438 | if (!node) { | 435 | if (!node) { |
439 | node = kmalloc(sizeof(struct eth1394_node_ref), | 436 | node = kmalloc(sizeof(*node), |
440 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); | 437 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); |
441 | if (!node) | 438 | if (!node) |
442 | return -ENOMEM; | 439 | return -ENOMEM; |
443 | 440 | ||
444 | node_info = kmalloc(sizeof(struct eth1394_node_info), | 441 | node_info = kmalloc(sizeof(*node_info), |
445 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); | 442 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); |
446 | if (!node_info) { | 443 | if (!node_info) { |
447 | kfree(node); | 444 | kfree(node); |
@@ -566,7 +563,6 @@ static void ether1394_add_host (struct hpsb_host *host) | |||
566 | struct eth1394_host_info *hi = NULL; | 563 | struct eth1394_host_info *hi = NULL; |
567 | struct net_device *dev = NULL; | 564 | struct net_device *dev = NULL; |
568 | struct eth1394_priv *priv; | 565 | struct eth1394_priv *priv; |
569 | static int version_printed = 0; | ||
570 | u64 fifo_addr; | 566 | u64 fifo_addr; |
571 | 567 | ||
572 | if (!(host->config_roms & HPSB_CONFIG_ROM_ENTRY_IP1394)) | 568 | if (!(host->config_roms & HPSB_CONFIG_ROM_ENTRY_IP1394)) |
@@ -581,9 +577,6 @@ static void ether1394_add_host (struct hpsb_host *host) | |||
581 | if (fifo_addr == ~0ULL) | 577 | if (fifo_addr == ~0ULL) |
582 | goto out; | 578 | goto out; |
583 | 579 | ||
584 | if (version_printed++ == 0) | ||
585 | ETH1394_PRINT_G (KERN_INFO, "%s\n", version); | ||
586 | |||
587 | /* We should really have our own alloc_hpsbdev() function in | 580 | /* We should really have our own alloc_hpsbdev() function in |
588 | * net_init.c instead of calling the one for ethernet then hijacking | 581 | * net_init.c instead of calling the one for ethernet then hijacking |
589 | * it for ourselves. That way we'd be a real networking device. */ | 582 | * it for ourselves. That way we'd be a real networking device. */ |
@@ -1021,7 +1014,7 @@ static inline int new_fragment(struct list_head *frag_info, int offset, int len) | |||
1021 | } | 1014 | } |
1022 | } | 1015 | } |
1023 | 1016 | ||
1024 | new = kmalloc(sizeof(struct fragment_info), GFP_ATOMIC); | 1017 | new = kmalloc(sizeof(*new), GFP_ATOMIC); |
1025 | if (!new) | 1018 | if (!new) |
1026 | return -ENOMEM; | 1019 | return -ENOMEM; |
1027 | 1020 | ||
@@ -1040,7 +1033,7 @@ static inline int new_partial_datagram(struct net_device *dev, | |||
1040 | { | 1033 | { |
1041 | struct partial_datagram *new; | 1034 | struct partial_datagram *new; |
1042 | 1035 | ||
1043 | new = kmalloc(sizeof(struct partial_datagram), GFP_ATOMIC); | 1036 | new = kmalloc(sizeof(*new), GFP_ATOMIC); |
1044 | if (!new) | 1037 | if (!new) |
1045 | return -ENOMEM; | 1038 | return -ENOMEM; |
1046 | 1039 | ||
@@ -1768,7 +1761,6 @@ fail: | |||
1768 | static void ether1394_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | 1761 | static void ether1394_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) |
1769 | { | 1762 | { |
1770 | strcpy (info->driver, driver_name); | 1763 | strcpy (info->driver, driver_name); |
1771 | strcpy (info->version, "$Rev: 1312 $"); | ||
1772 | /* FIXME XXX provide sane businfo */ | 1764 | /* FIXME XXX provide sane businfo */ |
1773 | strcpy (info->bus_info, "ieee1394"); | 1765 | strcpy (info->bus_info, "ieee1394"); |
1774 | } | 1766 | } |