diff options
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index b51d08be0bcf..62051f8b0910 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -118,7 +118,6 @@ | |||
118 | #include <linux/kernel.h> | 118 | #include <linux/kernel.h> |
119 | #include <linux/major.h> | 119 | #include <linux/major.h> |
120 | #include <linux/sched.h> | 120 | #include <linux/sched.h> |
121 | #include <linux/smp_lock.h> | ||
122 | #include <linux/slab.h> | 121 | #include <linux/slab.h> |
123 | #include <linux/fcntl.h> | 122 | #include <linux/fcntl.h> |
124 | #include <linux/delay.h> | 123 | #include <linux/delay.h> |
@@ -139,9 +138,6 @@ | |||
139 | /* 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 */ |
140 | #define LP_NO 8 | 139 | #define LP_NO 8 |
141 | 140 | ||
142 | /* ROUND_UP macro from fs/select.c */ | ||
143 | #define ROUND_UP(x,y) (((x)+(y)-1)/(y)) | ||
144 | |||
145 | static struct lp_struct lp_table[LP_NO]; | 141 | static struct lp_struct lp_table[LP_NO]; |
146 | 142 | ||
147 | static unsigned int lp_count = 0; | 143 | static unsigned int lp_count = 0; |
@@ -652,7 +648,7 @@ static int lp_ioctl(struct inode *inode, struct file *file, | |||
652 | (par_timeout.tv_usec < 0)) { | 648 | (par_timeout.tv_usec < 0)) { |
653 | return -EINVAL; | 649 | return -EINVAL; |
654 | } | 650 | } |
655 | to_jiffies = ROUND_UP(par_timeout.tv_usec, 1000000/HZ); | 651 | to_jiffies = DIV_ROUND_UP(par_timeout.tv_usec, 1000000/HZ); |
656 | to_jiffies += par_timeout.tv_sec * (long) HZ; | 652 | to_jiffies += par_timeout.tv_sec * (long) HZ; |
657 | if (to_jiffies <= 0) { | 653 | if (to_jiffies <= 0) { |
658 | return -EINVAL; | 654 | return -EINVAL; |
@@ -803,7 +799,7 @@ static int lp_register(int nr, struct parport *port) | |||
803 | if (reset) | 799 | if (reset) |
804 | lp_reset(nr); | 800 | lp_reset(nr); |
805 | 801 | ||
806 | class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, | 802 | class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), port->dev, |
807 | "lp%d", nr); | 803 | "lp%d", nr); |
808 | 804 | ||
809 | printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, | 805 | printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, |