Commit 7dd8ed09 authored by Vineeth Vijayan's avatar Vineeth Vijayan Committed by Heiko Carstens
Browse files

s390: use DEFINE_SPINLOCK for initialization



For static initialization of spinlock_t variable, use DEFINE_SPINLOCK
instead of explicitly calling spin_lock_init().

Signed-off-by: default avatarVineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 3784231b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static DEFINE_SPINLOCK(raw3215_device_lock);
/* list of free request structures */
static struct raw3215_req *raw3215_freelist;
/* spinlock to protect free list */
static spinlock_t raw3215_freelist_lock;
static DEFINE_SPINLOCK(raw3215_freelist_lock);

static struct tty_driver *tty3215_driver;

@@ -850,7 +850,6 @@ static int __init con3215_init(void)

	/* allocate 3215 request structures */
	raw3215_freelist = NULL;
	spin_lock_init(&raw3215_freelist_lock);
	for (i = 0; i < NR_3215_REQ; i++) {
		req = kzalloc(sizeof(struct raw3215_req), GFP_KERNEL | GFP_DMA);
		if (!req)
+1 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#define sclp_console_name  "ttyS"

/* Lock to guard over changes to global variables */
static spinlock_t sclp_con_lock;
static DEFINE_SPINLOCK(sclp_con_lock);
/* List of free pages that can be used for console output buffering */
static struct list_head sclp_con_pages;
/* List of full struct sclp_buffer structures ready for output */
@@ -329,7 +329,6 @@ sclp_console_init(void)
		list_add_tail(page, &sclp_con_pages);
	}
	INIT_LIST_HEAD(&sclp_con_outqueue);
	spin_lock_init(&sclp_con_lock);
	sclp_conbuf = NULL;
	timer_setup(&sclp_con_timer, sclp_console_timeout, 0);

+1 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
 */

/* Lock to guard over changes to global variables. */
static spinlock_t sclp_tty_lock;
static DEFINE_SPINLOCK(sclp_tty_lock);
/* List of free pages that can be used for console output buffering. */
static struct list_head sclp_tty_pages;
/* List of full struct sclp_buffer structures ready for output. */
@@ -526,7 +526,6 @@ sclp_tty_init(void)
		list_add_tail((struct list_head *) page, &sclp_tty_pages);
	}
	INIT_LIST_HEAD(&sclp_tty_outqueue);
	spin_lock_init(&sclp_tty_lock);
	timer_setup(&sclp_tty_timer, sclp_tty_timeout, 0);
	sclp_ttybuf = NULL;
	sclp_tty_buffer_count = 0;
+1 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static struct tty_driver *sclp_vt220_driver;
static struct tty_port sclp_vt220_port;

/* Lock to protect internal data from concurrent access */
static spinlock_t sclp_vt220_lock;
static DEFINE_SPINLOCK(sclp_vt220_lock);

/* List of empty pages to be used as write request buffers */
static struct list_head sclp_vt220_empty;
@@ -693,7 +693,6 @@ static int __init __sclp_vt220_init(int num_pages)
	sclp_vt220_init_count++;
	if (sclp_vt220_init_count != 1)
		return 0;
	spin_lock_init(&sclp_vt220_lock);
	INIT_LIST_HEAD(&sclp_vt220_empty);
	INIT_LIST_HEAD(&sclp_vt220_outqueue);
	timer_setup(&sclp_vt220_timer, sclp_vt220_timeout, 0);