aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 17:23:25 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-12-07 17:23:25 -0500
commitec9b7e1044d718723d16390179abc6d4c8d9b0a1 (patch)
treec045cf8babca557b3d1e2b4dcbb216229c614741 /drivers/ieee1394/sbp2.c
parent1e4f7bc8f8ce07b850a5831d01a6eae83055bb42 (diff)
ieee1394: sbp2: code formatting around work_struct stuff
Merge is finished, can bring the code in readable style again. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index ffcd9e41454c..e68b80b7340d 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -458,17 +458,20 @@ static void sbp2util_notify_fetch_agent(struct sbp2_lu *lu, u64 offset,
458 458
459static void sbp2util_write_orb_pointer(struct work_struct *work) 459static void sbp2util_write_orb_pointer(struct work_struct *work)
460{ 460{
461 struct sbp2_lu *lu = container_of(work, struct sbp2_lu, protocol_work);
461 quadlet_t data[2]; 462 quadlet_t data[2];
462 463
463 data[0] = ORB_SET_NODE_ID((container_of(work, struct sbp2_lu, protocol_work))->hi->host->node_id); 464 data[0] = ORB_SET_NODE_ID(lu->hi->host->node_id);
464 data[1] = (container_of(work, struct sbp2_lu, protocol_work))->last_orb_dma; 465 data[1] = lu->last_orb_dma;
465 sbp2util_cpu_to_be32_buffer(data, 8); 466 sbp2util_cpu_to_be32_buffer(data, 8);
466 sbp2util_notify_fetch_agent(container_of(work, struct sbp2_lu, protocol_work), SBP2_ORB_POINTER_OFFSET, data, 8); 467 sbp2util_notify_fetch_agent(lu, SBP2_ORB_POINTER_OFFSET, data, 8);
467} 468}
468 469
469static void sbp2util_write_doorbell(struct work_struct *work) 470static void sbp2util_write_doorbell(struct work_struct *work)
470{ 471{
471 sbp2util_notify_fetch_agent(container_of(work, struct sbp2_lu, protocol_work), SBP2_DOORBELL_OFFSET, NULL, 4); 472 struct sbp2_lu *lu = container_of(work, struct sbp2_lu, protocol_work);
473
474 sbp2util_notify_fetch_agent(lu, SBP2_DOORBELL_OFFSET, NULL, 4);
472} 475}
473 476
474static int sbp2util_create_command_orb_pool(struct sbp2_lu *lu) 477static int sbp2util_create_command_orb_pool(struct sbp2_lu *lu)
@@ -1399,7 +1402,7 @@ static int sbp2_agent_reset(struct sbp2_lu *lu, int wait)
1399 int retval; 1402 int retval;
1400 unsigned long flags; 1403 unsigned long flags;
1401 1404
1402 /* cancel_delayed_work(&lu->protocol_work); */ 1405 /* flush lu->protocol_work */
1403 if (wait) 1406 if (wait)
1404 flush_scheduled_work(); 1407 flush_scheduled_work();
1405 1408
@@ -1682,8 +1685,7 @@ static void sbp2_link_orb_command(struct sbp2_lu *lu,
1682 scsi_block_requests(lu->shost); 1685 scsi_block_requests(lu->shost);
1683 PREPARE_WORK(&lu->protocol_work, 1686 PREPARE_WORK(&lu->protocol_work,
1684 last_orb ? sbp2util_write_doorbell: 1687 last_orb ? sbp2util_write_doorbell:
1685 sbp2util_write_orb_pointer 1688 sbp2util_write_orb_pointer);
1686 /* */);
1687 schedule_work(&lu->protocol_work); 1689 schedule_work(&lu->protocol_work);
1688 } 1690 }
1689} 1691}