Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73347
b: refs/heads/master
c: fffe487
h: refs/heads/master
i:
  73345: fe189c2
  73343: 0e75578
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Nov 8, 2007
1 parent e9d13ad commit 0562b81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ec680e4c3ec818efd1652f15199ed1c216ab550
refs/heads/master: fffe487d59ba4017c7c62b06667ca4a226cee651
9 changes: 9 additions & 0 deletions trunk/drivers/block/pktcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,19 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf,
size_t count)
{
unsigned int major, minor;

if (sscanf(buf, "%u:%u", &major, &minor) == 2) {
/* pkt_setup_dev() expects caller to hold reference to self */
if (!try_module_get(THIS_MODULE))
return -ENODEV;

pkt_setup_dev(MKDEV(major, minor), NULL);

module_put(THIS_MODULE);

return count;
}

return -EINVAL;
}

Expand Down

0 comments on commit 0562b81

Please sign in to comment.