staging: most: use min_t
authorChristian Gromm <christian.gromm@microchip.com>
Tue, 22 Dec 2015 09:52:46 +0000 (10:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
This patch replaces min with min_t.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/aim-cdev/cdev.c

index 4bf0322..6ee4eb2 100644 (file)
@@ -246,7 +246,9 @@ start_copy:
                return -EIO;
        }
 
-       to_copy = min(count, (size_t)mbo->processed_length - channel->mbo_offs);
+       to_copy = min_t(size_t,
+                       count,
+                       mbo->processed_length - channel->mbo_offs);
 
        not_copied = copy_to_user(buf,
                                  mbo->virt_address + channel->mbo_offs,