aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-card.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-01-21 14:44:09 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:02:40 -0500
commit5e20c282184fd5794661b6688883231ff5348abc (patch)
treed9ea9b86d5e2bcc4ef4d8def27102a76ac4b05ef /drivers/firewire/fw-card.c
parent95688e97cdf7453cde22eaa73cc2ab6b113c1853 (diff)
firewire: whitespace adjustments
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r--drivers/firewire/fw-card.c41
1 files changed, 17 insertions, 24 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index 82a92432bcb7..c560fd5e74fc 100644
--- a/drivers/firewire/fw-card.c
+++ b/drivers/firewire/fw-card.c
@@ -76,12 +76,12 @@ generate_config_rom (struct fw_card *card, size_t *config_rom_length)
76 static u32 config_rom[256]; 76 static u32 config_rom[256];
77 int i, j, length; 77 int i, j, length;
78 78
79 /* Initialize contents of config rom buffer. On the OHCI 79 /* Initialize contents of config rom buffer. On the OHCI
80 * controller, block reads to the config rom accesses the host 80 * controller, block reads to the config rom accesses the host
81 * memory, but quadlet read access the hardware bus info block 81 * memory, but quadlet read access the hardware bus info block
82 * registers. That's just crack, but it means we should make 82 * registers. That's just crack, but it means we should make
83 * sure the contents of bus info block in host memory mathces 83 * sure the contents of bus info block in host memory mathces
84 * the version stored in the OHCI registers. */ 84 * the version stored in the OHCI registers. */
85 85
86 memset(config_rom, 0, sizeof config_rom); 86 memset(config_rom, 0, sizeof config_rom);
87 config_rom[0] = bib_crc_length(4) | bib_info_length(4) | bib_crc(0); 87 config_rom[0] = bib_crc_length(4) | bib_info_length(4) | bib_crc(0);
@@ -263,13 +263,13 @@ fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
263 static int index; 263 static int index;
264 264
265 card->index = index++; 265 card->index = index++;
266 card->driver = driver; 266 card->driver = driver;
267 card->device = device; 267 card->device = device;
268 card->current_tlabel = 0; 268 card->current_tlabel = 0;
269 card->tlabel_mask = 0; 269 card->tlabel_mask = 0;
270 card->color = 0; 270 card->color = 0;
271 271
272 INIT_LIST_HEAD(&card->transaction_list); 272 INIT_LIST_HEAD(&card->transaction_list);
273 spin_lock_init(&card->lock); 273 spin_lock_init(&card->lock);
274 setup_timer(&card->flush_timer, 274 setup_timer(&card->flush_timer,
275 flush_timer_callback, (unsigned long)card); 275 flush_timer_callback, (unsigned long)card);
@@ -307,7 +307,7 @@ fw_card_add(struct fw_card *card,
307 307
308 retval = device_add(&card->card_device); 308 retval = device_add(&card->card_device);
309 if (retval < 0) { 309 if (retval < 0) {
310 fw_error("Failed to register card device."); 310 fw_error("Failed to register card device.");
311 return retval; 311 return retval;
312 } 312 }
313 313
@@ -358,13 +358,13 @@ dummy_set_config_rom(struct fw_card *card,
358static void 358static void
359dummy_send_request(struct fw_card *card, struct fw_packet *packet) 359dummy_send_request(struct fw_card *card, struct fw_packet *packet)
360{ 360{
361 packet->callback(packet, card, -ENODEV); 361 packet->callback(packet, card, -ENODEV);
362} 362}
363 363
364static void 364static void
365dummy_send_response(struct fw_card *card, struct fw_packet *packet) 365dummy_send_response(struct fw_card *card, struct fw_packet *packet)
366{ 366{
367 packet->callback(packet, card, -ENODEV); 367 packet->callback(packet, card, -ENODEV);
368} 368}
369 369
370static int 370static int
@@ -375,12 +375,12 @@ dummy_enable_phys_dma(struct fw_card *card,
375} 375}
376 376
377static struct fw_card_driver dummy_driver = { 377static struct fw_card_driver dummy_driver = {
378 .name = "dummy", 378 .name = "dummy",
379 .enable = dummy_enable, 379 .enable = dummy_enable,
380 .update_phy_reg = dummy_update_phy_reg, 380 .update_phy_reg = dummy_update_phy_reg,
381 .set_config_rom = dummy_set_config_rom, 381 .set_config_rom = dummy_set_config_rom,
382 .send_request = dummy_send_request, 382 .send_request = dummy_send_request,
383 .send_response = dummy_send_response, 383 .send_response = dummy_send_response,
384 .enable_phys_dma = dummy_enable_phys_dma 384 .enable_phys_dma = dummy_enable_phys_dma
385}; 385};
386 386
@@ -428,13 +428,6 @@ EXPORT_SYMBOL(fw_card_put);
428int 428int
429fw_core_initiate_bus_reset(struct fw_card *card, int short_reset) 429fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
430{ 430{
431 u32 address; 431 return card->driver->update_phy_reg(card, short_reset ? 5 : 1, 0, 0x40);
432
433 if (short_reset)
434 address = 5;
435 else
436 address = 1;
437
438 return card->driver->update_phy_reg(card, address, 0, 0x40);
439} 432}
440EXPORT_SYMBOL(fw_core_initiate_bus_reset); 433EXPORT_SYMBOL(fw_core_initiate_bus_reset);