Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325322
b: refs/heads/master
c: 82e6bb0
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Sep 17, 2012
1 parent a333d06 commit 1ddbb52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 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: e4c536b72fd6b25c7f4f9c6f293f43ba287b8e8f
refs/heads/master: 82e6bb03983f265d06f2573e48e1cc0ae94d959a
32 changes: 10 additions & 22 deletions trunk/drivers/staging/silicom/bp_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -8071,20 +8071,13 @@ int
set_bypass_wd_pfs(struct file *file, const char *buffer,
unsigned long count, void *data)
{

char kbuf[256];
bpctl_dev_t *pbp_device_block = (bpctl_dev_t *) data;
int timeout;
int ret;

unsigned int timeout = 0;
char *timeout_ptr = kbuf;

if (copy_from_user(&kbuf, buffer, count)) {
return -1;
}

timeout_ptr = kbuf;
timeout = atoi(&timeout_ptr);

ret = kstrtoint_from_user(buffer, count, 10, &timeout);
if (ret)
return ret;
set_bypass_wd_fn(pbp_device_block, timeout);

return count;
Expand Down Expand Up @@ -8712,18 +8705,13 @@ int
set_wd_autoreset_pfs(struct file *file, const char *buffer,
unsigned long count, void *data)
{
char kbuf[256];
bpctl_dev_t *pbp_device_block = (bpctl_dev_t *) data;
u32 timeout = 0;
char *timeout_ptr = kbuf;

if (copy_from_user(&kbuf, buffer, count)) {
return -1;
}

timeout_ptr = kbuf;
timeout = atoi(&timeout_ptr);
int timeout;
int ret;

ret = kstrtoint_from_user(buffer, count, 10, &timeout);
if (ret)
return ret;
set_wd_autoreset_fn(pbp_device_block, timeout);

return count;
Expand Down

0 comments on commit 1ddbb52

Please sign in to comment.