Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15373
b: refs/heads/master
c: f02aa3f
h: refs/heads/master
i:
  15371: ee22bcb
v: v3
  • Loading branch information
Erik Hovland authored and Russell King committed Dec 30, 2005
1 parent e3cbafd commit 254597f
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82c9df820112c6286a8e8fbe482e94b65b49062c
refs/heads/master: f02aa3f9a3dea4375759ae1d87bebf2467719b72
2 changes: 1 addition & 1 deletion trunk/drivers/input/joystick/warrior.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv)
input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8);
input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0);
input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0);
input_set_abs_params(input_dev, ABS_HAT0Y, -1, 1, 0, 0);
input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0);

serio_set_drvdata(serio, warrior);

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/serial/pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static int serial_pxa_startup(struct uart_port *port)
if (port->line == 3) /* HWUART */
up->mcr |= UART_MCR_AFE;
else
up->mcr = 0;
up->mcr = 0;

/*
* Allocate the IRQ
Expand Down Expand Up @@ -641,7 +641,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
int i;

/*
* First save the UER then disable the interrupts
* First save the IER then disable the interrupts
*/
ier = serial_in(up, UART_IER);
serial_out(up, UART_IER, UART_IER_UUE);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/input/kbtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH);
input_dev->mscbit[0] |= BIT(MSC_SERIAL);
input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0);
input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0);
input_set_abs_params(input_dev, ABS_X, 0, 0x1750, 4, 0);
input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0);

endpoint = &intf->cur_altsetting->endpoint[0].desc;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/input/wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i

input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS);
input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS);
input_set_abs_params(input_dev, ABS_X, 0, wacom->features->x_max, 4, 0);
input_set_abs_params(input_dev, ABS_X, 0, wacom->features->y_max, 4, 0);
input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0);
input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0);

Expand Down
47 changes: 24 additions & 23 deletions trunk/fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,6 @@ proc_file_read(struct file *file, char __user *buf, size_t nbytes,
ssize_t n, count;
char *start;
struct proc_dir_entry * dp;
unsigned long long pos;

/*
* Gaah, please just use "seq_file" instead. The legacy /proc
* interfaces cut loff_t down to off_t for reads, and ignore
* the offset entirely for writes..
*/
pos = *ppos;
if (pos > MAX_NON_LFS)
return 0;
if (nbytes > MAX_NON_LFS - pos)
nbytes = MAX_NON_LFS - pos;

dp = PDE(inode);
if (!(page = (char*) __get_free_page(GFP_KERNEL)))
Expand Down Expand Up @@ -214,17 +202,30 @@ proc_file_write(struct file *file, const char __user *buffer,
static loff_t
proc_file_lseek(struct file *file, loff_t offset, int orig)
{
loff_t retval = -EINVAL;
switch (orig) {
case 1:
offset += file->f_pos;
/* fallthrough */
case 0:
if (offset < 0 || offset > MAX_NON_LFS)
break;
file->f_pos = retval = offset;
}
return retval;
lock_kernel();

switch (orig) {
case 0:
if (offset < 0)
goto out;
file->f_pos = offset;
unlock_kernel();
return(file->f_pos);
case 1:
if (offset + file->f_pos < 0)
goto out;
file->f_pos += offset;
unlock_kernel();
return(file->f_pos);
case 2:
goto out;
default:
goto out;
}

out:
unlock_kernel();
return -EINVAL;
}

static int proc_notify_change(struct dentry *dentry, struct iattr *iattr)
Expand Down
6 changes: 4 additions & 2 deletions trunk/kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2201,12 +2201,14 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen,
if (get_user(len, oldlenp))
return -EFAULT;
if (len) {
l = strlen(table->data)+1;
l = strlen(table->data);
if (len > l) len = l;
if (len >= table->maxlen)
len = table->maxlen;
if(copy_to_user(oldval, table->data, len))
return -EFAULT;
if(put_user(0, ((char __user *) oldval) + len))
return -EFAULT;
if(put_user(len, oldlenp))
return -EFAULT;
}
Expand All @@ -2221,7 +2223,7 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen,
len--;
((char *) table->data)[len] = 0;
}
return 1;
return 0;
}

/*
Expand Down

0 comments on commit 254597f

Please sign in to comment.