Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259482
b: refs/heads/master
c: efad25e
h: refs/heads/master
v: v3
  • Loading branch information
matt mooney authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent c30d467 commit 9e39d05
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 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: 87352760173082c2a774f83dc6fe826fdbf219c0
refs/heads/master: efad25e9a34d25c1c2469aa81ae1418ca1f26942
48 changes: 24 additions & 24 deletions trunk/drivers/staging/usbip/stub_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,21 @@ struct kmem_cache *stub_priv_cache;
static struct bus_id_priv busid_table[MAX_BUSID];
static spinlock_t busid_table_lock;

static void init_busid_table(void)
{
int i;

for (i = 0; i < MAX_BUSID; i++) {
memset(busid_table[i].name, 0, BUSID_SIZE);
busid_table[i].status = STUB_BUSID_OTHER;
busid_table[i].interf_count = 0;
busid_table[i].sdev = NULL;
busid_table[i].shutdown_busid = 0;
}

spin_lock_init(&busid_table_lock);
}

int match_busid(const char *busid)
{
int i;
Expand Down Expand Up @@ -69,21 +84,6 @@ struct bus_id_priv *get_busid_priv(const char *busid)
return NULL;
}

static ssize_t show_match_busid(struct device_driver *drv, char *buf)
{
int i;
char *out = buf;

spin_lock(&busid_table_lock);
for (i = 0; i < MAX_BUSID; i++)
if (busid_table[i].name[0])
out += sprintf(out, "%s ", busid_table[i].name);
spin_unlock(&busid_table_lock);

out += sprintf(out, "\n");
return out - buf;
}

static int add_match_busid(char *busid)
{
int i;
Expand Down Expand Up @@ -128,19 +128,19 @@ int del_match_busid(char *busid)
return -1;
}

static void init_busid_table(void)
static ssize_t show_match_busid(struct device_driver *drv, char *buf)
{
int i;
char *out = buf;

for (i = 0; i < MAX_BUSID; i++) {
memset(busid_table[i].name, 0, BUSID_SIZE);
busid_table[i].status = STUB_BUSID_OTHER;
busid_table[i].interf_count = 0;
busid_table[i].sdev = NULL;
busid_table[i].shutdown_busid = 0;
}
spin_lock(&busid_table_lock);
for (i = 0; i < MAX_BUSID; i++)
if (busid_table[i].name[0])
out += sprintf(out, "%s ", busid_table[i].name);
spin_unlock(&busid_table_lock);

spin_lock_init(&busid_table_lock);
out += sprintf(out, "\n");
return out - buf;
}

static ssize_t store_match_busid(struct device_driver *dev, const char *buf,
Expand Down

0 comments on commit 9e39d05

Please sign in to comment.