summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/sbp2.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2011-09-19 00:20:48 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2011-10-09 17:00:18 +0200
commit4ec4a67aa100268b4ac5ae32b54843d975969969 (patch)
tree0cb2413784e788939edd625c2b163c7f410f2c61 /drivers/firewire/sbp2.c
parentfirewire: ohci: optimize TSB41BA3D detection (diff)
downloadlinux-4ec4a67aa100268b4ac5ae32b54843d975969969.tar.xz
linux-4ec4a67aa100268b4ac5ae32b54843d975969969.zip
firewire: use clamp and min3 macros
Use kernel.h's convenience macros. Also omit a printk that should never happen and won't matter much if it ever happened. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/sbp2.c')
-rw-r--r--drivers/firewire/sbp2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c
index 8a8047db6980..68375bc3aef6 100644
--- a/drivers/firewire/sbp2.c
+++ b/drivers/firewire/sbp2.c
@@ -1164,8 +1164,8 @@ static int sbp2_probe(struct device *dev)
* specifies the max payload size as 2 ^ (max_payload + 2), so
* if we set this to max_speed + 7, we get the right value.
*/
- tgt->max_payload = min(device->max_speed + 7, 10U);
- tgt->max_payload = min(tgt->max_payload, device->card->max_receive - 1);
+ tgt->max_payload = min3(device->max_speed + 7, 10U,
+ device->card->max_receive - 1);
/* Do the login in a workqueue so we can easily reschedule retries. */
list_for_each_entry(lu, &tgt->lu_list, link)