diff options
author | matt mooney <mfm@muteddisk.com> | 2011-05-27 01:49:24 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 14:29:16 -0700 |
commit | 0a186be35963bd9bc4c148554188e927578115b0 (patch) | |
tree | 69f9fc237639b71d164473a181110333d3038300 /drivers/staging/usbip | |
parent | 1109566469f7df817753939227e989c6395a7595 (diff) | |
download | linux-0-day-0a186be35963bd9bc4c148554188e927578115b0.tar.gz linux-0-day-0a186be35963bd9bc4c148554188e927578115b0.tar.xz |
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: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r-- | drivers/staging/usbip/stub_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/usbip/stub_main.c b/drivers/staging/usbip/stub_main.c index 45a0f5dfcb184..a34249a9cb6e1 100644 --- a/drivers/staging/usbip/stub_main.c +++ b/drivers/staging/usbip/stub_main.c @@ -39,13 +39,9 @@ static void init_busid_table(void) { int i; - for (i = 0; i < MAX_BUSID; i++) { - memset(busid_table[i].name, 0, BUSID_SIZE); + memset(busid_table, 0, sizeof(busid_table)); + for (i = 0; i < MAX_BUSID; i++) 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); } |