aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-card.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-12-14 15:47:04 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 15:56:40 -0400
commit53dca51175cc2f66d21aeb1e70146cca65c53dad (patch)
treeda729da20cc4ca1cb994fa6659be7f23259f7097 /drivers/firewire/fw-card.c
parent2dbd7d7e2327b0c2cc4e2de903e1cfa19980a504 (diff)
firewire: remove line breaks before function names
type function_name(parameters); is nice to look at but was not used consistently. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-card.c')
-rw-r--r--drivers/firewire/fw-card.c68
1 files changed, 25 insertions, 43 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index a5dd7a665aa8..27a3aae58cfd 100644
--- a/drivers/firewire/fw-card.c
+++ b/drivers/firewire/fw-card.c
@@ -63,8 +63,7 @@ static int descriptor_count;
63#define BIB_CMC ((1) << 30) 63#define BIB_CMC ((1) << 30)
64#define BIB_IMC ((1) << 31) 64#define BIB_IMC ((1) << 31)
65 65
66static u32 * 66static u32 *generate_config_rom(struct fw_card *card, size_t *config_rom_length)
67generate_config_rom(struct fw_card *card, size_t *config_rom_length)
68{ 67{
69 struct fw_descriptor *desc; 68 struct fw_descriptor *desc;
70 static u32 config_rom[256]; 69 static u32 config_rom[256];
@@ -128,8 +127,7 @@ generate_config_rom(struct fw_card *card, size_t *config_rom_length)
128 return config_rom; 127 return config_rom;
129} 128}
130 129
131static void 130static void update_config_roms(void)
132update_config_roms(void)
133{ 131{
134 struct fw_card *card; 132 struct fw_card *card;
135 u32 *config_rom; 133 u32 *config_rom;
@@ -141,8 +139,7 @@ update_config_roms(void)
141 } 139 }
142} 140}
143 141
144int 142int fw_core_add_descriptor(struct fw_descriptor *desc)
145fw_core_add_descriptor(struct fw_descriptor *desc)
146{ 143{
147 size_t i; 144 size_t i;
148 145
@@ -171,8 +168,7 @@ fw_core_add_descriptor(struct fw_descriptor *desc)
171 return 0; 168 return 0;
172} 169}
173 170
174void 171void fw_core_remove_descriptor(struct fw_descriptor *desc)
175fw_core_remove_descriptor(struct fw_descriptor *desc)
176{ 172{
177 mutex_lock(&card_mutex); 173 mutex_lock(&card_mutex);
178 174
@@ -189,8 +185,7 @@ static const char gap_count_table[] = {
189 63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40 185 63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
190}; 186};
191 187
192void 188void fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
193fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
194{ 189{
195 int scheduled; 190 int scheduled;
196 191
@@ -200,8 +195,7 @@ fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
200 fw_card_put(card); 195 fw_card_put(card);
201} 196}
202 197
203static void 198static void fw_card_bm_work(struct work_struct *work)
204fw_card_bm_work(struct work_struct *work)
205{ 199{
206 struct fw_card *card = container_of(work, struct fw_card, work.work); 200 struct fw_card *card = container_of(work, struct fw_card, work.work);
207 struct fw_device *root_device; 201 struct fw_device *root_device;
@@ -371,17 +365,16 @@ fw_card_bm_work(struct work_struct *work)
371 fw_card_put(card); 365 fw_card_put(card);
372} 366}
373 367
374static void 368static void flush_timer_callback(unsigned long data)
375flush_timer_callback(unsigned long data)
376{ 369{
377 struct fw_card *card = (struct fw_card *)data; 370 struct fw_card *card = (struct fw_card *)data;
378 371
379 fw_flush_transactions(card); 372 fw_flush_transactions(card);
380} 373}
381 374
382void 375void fw_card_initialize(struct fw_card *card,
383fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver, 376 const struct fw_card_driver *driver,
384 struct device *device) 377 struct device *device)
385{ 378{
386 static atomic_t index = ATOMIC_INIT(-1); 379 static atomic_t index = ATOMIC_INIT(-1);
387 380
@@ -406,9 +399,8 @@ fw_card_initialize(struct fw_card *card, const struct fw_card_driver *driver,
406} 399}
407EXPORT_SYMBOL(fw_card_initialize); 400EXPORT_SYMBOL(fw_card_initialize);
408 401
409int 402int fw_card_add(struct fw_card *card,
410fw_card_add(struct fw_card *card, 403 u32 max_receive, u32 link_speed, u64 guid)
411 u32 max_receive, u32 link_speed, u64 guid)
412{ 404{
413 u32 *config_rom; 405 u32 *config_rom;
414 size_t length; 406 size_t length;
@@ -442,23 +434,20 @@ EXPORT_SYMBOL(fw_card_add);
442 * dummy driver just fails all IO. 434 * dummy driver just fails all IO.
443 */ 435 */
444 436
445static int 437static int dummy_enable(struct fw_card *card, u32 *config_rom, size_t length)
446dummy_enable(struct fw_card *card, u32 *config_rom, size_t length)
447{ 438{
448 BUG(); 439 BUG();
449 return -1; 440 return -1;
450} 441}
451 442
452static int 443static int dummy_update_phy_reg(struct fw_card *card, int address,
453dummy_update_phy_reg(struct fw_card *card, int address, 444 int clear_bits, int set_bits)
454 int clear_bits, int set_bits)
455{ 445{
456 return -ENODEV; 446 return -ENODEV;
457} 447}
458 448
459static int 449static int dummy_set_config_rom(struct fw_card *card,
460dummy_set_config_rom(struct fw_card *card, 450 u32 *config_rom, size_t length)
461 u32 *config_rom, size_t length)
462{ 451{
463 /* 452 /*
464 * We take the card out of card_list before setting the dummy 453 * We take the card out of card_list before setting the dummy
@@ -468,27 +457,23 @@ dummy_set_config_rom(struct fw_card *card,
468 return -1; 457 return -1;
469} 458}
470 459
471static void 460static void dummy_send_request(struct fw_card *card, struct fw_packet *packet)
472dummy_send_request(struct fw_card *card, struct fw_packet *packet)
473{ 461{
474 packet->callback(packet, card, -ENODEV); 462 packet->callback(packet, card, -ENODEV);
475} 463}
476 464
477static void 465static void dummy_send_response(struct fw_card *card, struct fw_packet *packet)
478dummy_send_response(struct fw_card *card, struct fw_packet *packet)
479{ 466{
480 packet->callback(packet, card, -ENODEV); 467 packet->callback(packet, card, -ENODEV);
481} 468}
482 469
483static int 470static int dummy_cancel_packet(struct fw_card *card, struct fw_packet *packet)
484dummy_cancel_packet(struct fw_card *card, struct fw_packet *packet)
485{ 471{
486 return -ENOENT; 472 return -ENOENT;
487} 473}
488 474
489static int 475static int dummy_enable_phys_dma(struct fw_card *card,
490dummy_enable_phys_dma(struct fw_card *card, 476 int node_id, int generation)
491 int node_id, int generation)
492{ 477{
493 return -ENODEV; 478 return -ENODEV;
494} 479}
@@ -503,16 +488,14 @@ static struct fw_card_driver dummy_driver = {
503 .enable_phys_dma = dummy_enable_phys_dma, 488 .enable_phys_dma = dummy_enable_phys_dma,
504}; 489};
505 490
506void 491void fw_card_release(struct kref *kref)
507fw_card_release(struct kref *kref)
508{ 492{
509 struct fw_card *card = container_of(kref, struct fw_card, kref); 493 struct fw_card *card = container_of(kref, struct fw_card, kref);
510 494
511 complete(&card->done); 495 complete(&card->done);
512} 496}
513 497
514void 498void fw_core_remove_card(struct fw_card *card)
515fw_core_remove_card(struct fw_card *card)
516{ 499{
517 card->driver->update_phy_reg(card, 4, 500 card->driver->update_phy_reg(card, 4,
518 PHY_LINK_ACTIVE | PHY_CONTENDER, 0); 501 PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
@@ -536,8 +519,7 @@ fw_core_remove_card(struct fw_card *card)
536} 519}
537EXPORT_SYMBOL(fw_core_remove_card); 520EXPORT_SYMBOL(fw_core_remove_card);
538 521
539int 522int fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
540fw_core_initiate_bus_reset(struct fw_card *card, int short_reset)
541{ 523{
542 int reg = short_reset ? 5 : 1; 524 int reg = short_reset ? 5 : 1;
543 int bit = short_reset ? PHY_BUS_SHORT_RESET : PHY_BUS_RESET; 525 int bit = short_reset ? PHY_BUS_SHORT_RESET : PHY_BUS_RESET;