usbip: vudc: Make use of the helper macro LIST_HEAD()

Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.

LIST_HEAD() helps to clean up the code "struct list_head vudc_devices =",
only to care about the variable 'vudc_devices'.

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
Link: https://lore.kernel.org/r/20220211012807.7415-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Cai Huoqing 2022-02-11 09:28:07 +08:00 committed by Greg Kroah-Hartman
parent 18819ad238
commit 4378e427f7
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ static struct platform_driver vudc_driver = {
},
};
static struct list_head vudc_devices = LIST_HEAD_INIT(vudc_devices);
static LIST_HEAD(vudc_devices);
static int __init init(void)
{