aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/lp.c
diff options
context:
space:
mode:
authorMilind Arun Choudhary <milindchoudhary@gmail.com>2007-05-08 03:28:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:08 -0400
commitb259d74b39595f6ac74c3627b9c3657ac90249a0 (patch)
tree28c9bb48ea94b9afef2228dc57e04866941e7adc /drivers/char/lp.c
parent0e8638e2ace18eb6b814a63fe087106be05ca267 (diff)
ROUND_UP macro cleanup in drivers/char/lp.c
ROUND_UP macro cleanup use DIV_ROUND_UP Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r--drivers/char/lp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index fa626034a6e2..62051f8b0910 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -138,9 +138,6 @@
138/* if you have more than 8 printers, remember to increase LP_NO */ 138/* if you have more than 8 printers, remember to increase LP_NO */
139#define LP_NO 8 139#define LP_NO 8
140 140
141/* ROUND_UP macro from fs/select.c */
142#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
143
144static struct lp_struct lp_table[LP_NO]; 141static struct lp_struct lp_table[LP_NO];
145 142
146static unsigned int lp_count = 0; 143static unsigned int lp_count = 0;
@@ -651,7 +648,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
651 (par_timeout.tv_usec < 0)) { 648 (par_timeout.tv_usec < 0)) {
652 return -EINVAL; 649 return -EINVAL;
653 } 650 }
654 to_jiffies = ROUND_UP(par_timeout.tv_usec, 1000000/HZ); 651 to_jiffies = DIV_ROUND_UP(par_timeout.tv_usec, 1000000/HZ);
655 to_jiffies += par_timeout.tv_sec * (long) HZ; 652 to_jiffies += par_timeout.tv_sec * (long) HZ;
656 if (to_jiffies <= 0) { 653 if (to_jiffies <= 0) {
657 return -EINVAL; 654 return -EINVAL;