提交 8bc00c04 编写于 作者: V Vineeth Vijayan 提交者: Heiko Carstens

s390/sclp: use LIST_HEAD for Initialization

For static initialization of list_head variable, use LIST_HEAD
instead of INIT_LIST_HEAD function.
Suggested-by: NJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: NVineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: NHeiko Carstens <hca@linux.ibm.com>
上级 7dd8ed09
...@@ -37,10 +37,10 @@ static sccb_mask_t sclp_receive_mask; ...@@ -37,10 +37,10 @@ static sccb_mask_t sclp_receive_mask;
static sccb_mask_t sclp_send_mask; static sccb_mask_t sclp_send_mask;
/* List of registered event listeners and senders. */ /* List of registered event listeners and senders. */
static struct list_head sclp_reg_list; static LIST_HEAD(sclp_reg_list);
/* List of queued requests. */ /* List of queued requests. */
static struct list_head sclp_req_queue; static LIST_HEAD(sclp_req_queue);
/* Data for read and and init requests. */ /* Data for read and and init requests. */
static struct sclp_req sclp_read_req; static struct sclp_req sclp_read_req;
...@@ -1178,8 +1178,6 @@ sclp_init(void) ...@@ -1178,8 +1178,6 @@ sclp_init(void)
sclp_init_sccb = (void *) __get_free_page(GFP_ATOMIC | GFP_DMA); sclp_init_sccb = (void *) __get_free_page(GFP_ATOMIC | GFP_DMA);
BUG_ON(!sclp_read_sccb || !sclp_init_sccb); BUG_ON(!sclp_read_sccb || !sclp_init_sccb);
/* Set up variables */ /* Set up variables */
INIT_LIST_HEAD(&sclp_req_queue);
INIT_LIST_HEAD(&sclp_reg_list);
list_add(&sclp_state_change_event.list, &sclp_reg_list); list_add(&sclp_state_change_event.list, &sclp_reg_list);
timer_setup(&sclp_request_timer, NULL, 0); timer_setup(&sclp_request_timer, NULL, 0);
timer_setup(&sclp_queue_timer, sclp_req_queue_timeout, 0); timer_setup(&sclp_queue_timer, sclp_req_queue_timeout, 0);
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
/* Lock to guard over changes to global variables */ /* Lock to guard over changes to global variables */
static DEFINE_SPINLOCK(sclp_con_lock); static DEFINE_SPINLOCK(sclp_con_lock);
/* List of free pages that can be used for console output buffering */ /* List of free pages that can be used for console output buffering */
static struct list_head sclp_con_pages; static LIST_HEAD(sclp_con_pages);
/* List of full struct sclp_buffer structures ready for output */ /* List of full struct sclp_buffer structures ready for output */
static struct list_head sclp_con_outqueue; static LIST_HEAD(sclp_con_outqueue);
/* Pointer to current console buffer */ /* Pointer to current console buffer */
static struct sclp_buffer *sclp_conbuf; static struct sclp_buffer *sclp_conbuf;
/* Timer for delayed output of console messages */ /* Timer for delayed output of console messages */
...@@ -323,12 +323,10 @@ sclp_console_init(void) ...@@ -323,12 +323,10 @@ sclp_console_init(void)
if (rc) if (rc)
return rc; return rc;
/* Allocate pages for output buffering */ /* Allocate pages for output buffering */
INIT_LIST_HEAD(&sclp_con_pages);
for (i = 0; i < sclp_console_pages; i++) { for (i = 0; i < sclp_console_pages; i++) {
page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
list_add_tail(page, &sclp_con_pages); list_add_tail(page, &sclp_con_pages);
} }
INIT_LIST_HEAD(&sclp_con_outqueue);
sclp_conbuf = NULL; sclp_conbuf = NULL;
timer_setup(&sclp_con_timer, sclp_console_timeout, 0); timer_setup(&sclp_con_timer, sclp_console_timeout, 0);
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
/* Lock to guard over changes to global variables. */ /* Lock to guard over changes to global variables. */
static DEFINE_SPINLOCK(sclp_tty_lock); static DEFINE_SPINLOCK(sclp_tty_lock);
/* List of free pages that can be used for console output buffering. */ /* List of free pages that can be used for console output buffering. */
static struct list_head sclp_tty_pages; static LIST_HEAD(sclp_tty_pages);
/* List of full struct sclp_buffer structures ready for output. */ /* List of full struct sclp_buffer structures ready for output. */
static struct list_head sclp_tty_outqueue; static LIST_HEAD(sclp_tty_outqueue);
/* Counter how many buffers are emitted. */ /* Counter how many buffers are emitted. */
static int sclp_tty_buffer_count; static int sclp_tty_buffer_count;
/* Pointer to current console buffer. */ /* Pointer to current console buffer. */
...@@ -516,7 +516,6 @@ sclp_tty_init(void) ...@@ -516,7 +516,6 @@ sclp_tty_init(void)
return rc; return rc;
} }
/* Allocate pages for output buffering */ /* Allocate pages for output buffering */
INIT_LIST_HEAD(&sclp_tty_pages);
for (i = 0; i < MAX_KMEM_PAGES; i++) { for (i = 0; i < MAX_KMEM_PAGES; i++) {
page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA); page = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
if (page == NULL) { if (page == NULL) {
...@@ -525,7 +524,6 @@ sclp_tty_init(void) ...@@ -525,7 +524,6 @@ sclp_tty_init(void)
} }
list_add_tail((struct list_head *) page, &sclp_tty_pages); list_add_tail((struct list_head *) page, &sclp_tty_pages);
} }
INIT_LIST_HEAD(&sclp_tty_outqueue);
timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0); timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0);
sclp_ttybuf = NULL; sclp_ttybuf = NULL;
sclp_tty_buffer_count = 0; sclp_tty_buffer_count = 0;
......
...@@ -64,10 +64,10 @@ static struct tty_port sclp_vt220_port; ...@@ -64,10 +64,10 @@ static struct tty_port sclp_vt220_port;
static DEFINE_SPINLOCK(sclp_vt220_lock); static DEFINE_SPINLOCK(sclp_vt220_lock);
/* List of empty pages to be used as write request buffers */ /* List of empty pages to be used as write request buffers */
static struct list_head sclp_vt220_empty; static LIST_HEAD(sclp_vt220_empty);
/* List of pending requests */ /* List of pending requests */
static struct list_head sclp_vt220_outqueue; static LIST_HEAD(sclp_vt220_outqueue);
/* Suspend mode flag */ /* Suspend mode flag */
static int sclp_vt220_suspended; static int sclp_vt220_suspended;
...@@ -693,8 +693,6 @@ static int __init __sclp_vt220_init(int num_pages) ...@@ -693,8 +693,6 @@ static int __init __sclp_vt220_init(int num_pages)
sclp_vt220_init_count++; sclp_vt220_init_count++;
if (sclp_vt220_init_count != 1) if (sclp_vt220_init_count != 1)
return 0; return 0;
INIT_LIST_HEAD(&sclp_vt220_empty);
INIT_LIST_HEAD(&sclp_vt220_outqueue);
timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0); timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0);
tty_port_init(&sclp_vt220_port); tty_port_init(&sclp_vt220_port);
sclp_vt220_current_request = NULL; sclp_vt220_current_request = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册