Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers: most: use LIST_HEAD() for list_head

There's no need to declare a list and then init it manually,
just use the LIST_HEAD() macro.

Signed-off-by: Shixin Liu <liushixin2@huawei.com>
Link: https://lore.kernel.org/r/20210329094015.66942-2-liushixin2@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Shixin Liu and committed by
Greg Kroah-Hartman
57515640 2c4134e7

+1 -2
+1 -2
drivers/most/most_cdev.c
··· 44 44 }; 45 45 46 46 #define to_channel(d) container_of(d, struct comp_channel, cdev) 47 - static struct list_head channel_list; 47 + static LIST_HEAD(channel_list); 48 48 static DEFINE_SPINLOCK(ch_list_lock); 49 49 50 50 static inline bool ch_has_mbo(struct comp_channel *c) ··· 494 494 if (IS_ERR(comp.class)) 495 495 return PTR_ERR(comp.class); 496 496 497 - INIT_LIST_HEAD(&channel_list); 498 497 ida_init(&comp.minor_id); 499 498 500 499 err = alloc_chrdev_region(&comp.devno, 0, CHRDEV_REGION_SIZE, "cdev");