Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359348
b: refs/heads/master
c: cffcd59
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent b9d86dd commit 188fd2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 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: 6a9200603d76de1f8029b83c041f8eef99877a65
refs/heads/master: cffcd59f15db02b341e50da653860afa0ba11a83
14 changes: 1 addition & 13 deletions trunk/drivers/infiniband/hw/ocrdma/ocrdma_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ static DEFINE_IDR(ocrdma_dev_id);

static union ib_gid ocrdma_zero_sgid;

static int ocrdma_get_instance(void)
{
int instance = 0;

/* Assign an unused number */
if (!idr_pre_get(&ocrdma_dev_id, GFP_KERNEL))
return -1;
if (idr_get_new(&ocrdma_dev_id, NULL, &instance))
return -1;
return instance;
}

void ocrdma_get_guid(struct ocrdma_dev *dev, u8 *guid)
{
u8 mac_addr[6];
Expand Down Expand Up @@ -416,7 +404,7 @@ static struct ocrdma_dev *ocrdma_add(struct be_dev_info *dev_info)
goto idr_err;

memcpy(&dev->nic_info, dev_info, sizeof(*dev_info));
dev->id = ocrdma_get_instance();
dev->id = idr_alloc(&ocrdma_dev_id, NULL, 0, 0, GFP_KERNEL);
if (dev->id < 0)
goto idr_err;

Expand Down

0 comments on commit 188fd2e

Please sign in to comment.