diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2012-02-18 22:03:14 +0100 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2012-02-22 22:36:00 +0100 |
commit | 26b4950de174bc96c27b77546370dec84fb75ae7 (patch) | |
tree | a48479a6f1f4675d900b621d6ddfde92aadb0e33 /drivers/firewire/core-cdev.c | |
parent | 8408dc1c14c113face77f6f967af98f76999989f (diff) | |
download | linux-stable-26b4950de174bc96c27b77546370dec84fb75ae7.tar.gz linux-stable-26b4950de174bc96c27b77546370dec84fb75ae7.tar.bz2 linux-stable-26b4950de174bc96c27b77546370dec84fb75ae7.zip |
firewire: core: prefix log messages with card name
Associate all log messages from firewire-core with the respective card
because some people have more than one card. E.g.
firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0
firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT contexts, quirks 0x0
firewire_core: created device fw0: GUID 0814438400000389, S800
firewire_core: phy config: new root=ffc1, gap_count=5
firewire_core: created device fw1: GUID 0814438400000388, S800
firewire_core: created device fw2: GUID 0001d202e06800d1, S800
turns into
firewire_ohci 0000:04:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0
firewire_ohci 0000:05:00.0: added OHCI v1.10 device as card 1, 8 IR + 8 IT contexts, quirks 0x0
firewire_core 0000:04:00.0: created device fw0: GUID 0814438400000389, S800
firewire_core 0000:04:00.0: phy config: new root=ffc1, gap_count=5
firewire_core 0000:05:00.0: created device fw1: GUID 0814438400000388, S800
firewire_core 0000:04:00.0: created device fw2: GUID 0001d202e06800d1, S800
This increases the module size slightly; to keep this in check, turn the
former printk wrapper macros into functions. Their implementation is
largely copied from driver core's dev_printk counterparts.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/core-cdev.c')
-rw-r--r-- | drivers/firewire/core-cdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 4799393247c8..f5f5a9706fcc 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -389,7 +389,7 @@ static void queue_bus_reset_event(struct client *client) e = kzalloc(sizeof(*e), GFP_KERNEL); if (e == NULL) { - fw_notify("Out of memory when allocating event\n"); + fw_notice(client->device->card, "out of memory when allocating event\n"); return; } @@ -691,7 +691,7 @@ static void handle_request(struct fw_card *card, struct fw_request *request, r = kmalloc(sizeof(*r), GFP_ATOMIC); e = kmalloc(sizeof(*e), GFP_ATOMIC); if (r == NULL || e == NULL) { - fw_notify("Out of memory when allocating event\n"); + fw_notice(card, "out of memory when allocating event\n"); goto failed; } r->card = card; @@ -928,7 +928,7 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle, e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC); if (e == NULL) { - fw_notify("Out of memory when allocating event\n"); + fw_notice(context->card, "out of memory when allocating event\n"); return; } e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT; @@ -948,7 +948,7 @@ static void iso_mc_callback(struct fw_iso_context *context, e = kmalloc(sizeof(*e), GFP_ATOMIC); if (e == NULL) { - fw_notify("Out of memory when allocating event\n"); + fw_notice(context->card, "out of memory when allocating event\n"); return; } e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL; @@ -1548,7 +1548,7 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p) list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) { e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC); if (e == NULL) { - fw_notify("Out of memory when allocating event\n"); + fw_notice(card, "out of memory when allocating event\n"); break; } e->phy_packet.closure = client->phy_receiver_closure; |