Commit 0a186be3 authored by matt mooney's avatar matt mooney Committed by Greg Kroah-Hartman

staging: usbip: stub_main.c: simplify busid_table initialization

Set the whole structure to zero instead of individually setting each
member, which simplifies the for loop.

This was suggested by walter harms <wharms@bfs.de>.
Signed-off-by: default avatarmatt mooney <mfm@muteddisk.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 11095664
...@@ -39,13 +39,9 @@ static void init_busid_table(void) ...@@ -39,13 +39,9 @@ static void init_busid_table(void)
{ {
int i; int i;
for (i = 0; i < MAX_BUSID; i++) { memset(busid_table, 0, sizeof(busid_table));
memset(busid_table[i].name, 0, BUSID_SIZE); for (i = 0; i < MAX_BUSID; i++)
busid_table[i].status = STUB_BUSID_OTHER; 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); spin_lock_init(&busid_table_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment