LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Willy Tarreau <willy@meta-x.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] staging: panel: remove initialization check
Date: Sun,  8 Mar 2015 23:07:26 +0530	[thread overview]
Message-ID: <1425836246-15355-3-git-send-email-sudipm.mukherjee@gmail.com> (raw)
In-Reply-To: <1425836246-15355-1-git-send-email-sudipm.mukherjee@gmail.com>

no need to monitor init_in_progress now as keypad_send_key() can only
be called after the timer is initialized. and timer is initialized
from keypad_init() which is in the attach section and can only execute
after the module has initialized.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/panel/panel.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c
index b4c143a..16fee49 100644
--- a/drivers/staging/panel/panel.c
+++ b/drivers/staging/panel/panel.c
@@ -452,8 +452,6 @@ static struct pardevice *pprt;
 
 static int keypad_initialized;
 
-static char init_in_progress;
-
 static void (*lcd_write_cmd)(int);
 static void (*lcd_write_data)(int);
 static void (*lcd_clear_fast)(void);
@@ -1688,9 +1686,6 @@ static struct miscdevice keypad_dev = {
 
 static void keypad_send_key(const char *string, int max_len)
 {
-	if (init_in_progress)
-		return;
-
 	/* send the key to the device only if a process is attached to it. */
 	if (!atomic_read(&keypad_available)) {
 		while (max_len-- && keypad_buflen < KEYPAD_BUFFER && *string) {
@@ -2351,9 +2346,6 @@ static int __init panel_init_module(void)
 		break;
 	}
 
-	/* tells various subsystems about the fact that we are initializing */
-	init_in_progress = 1;
-
 	if (!lcd.enabled && !keypad.enabled) {
 		/* no device enabled, let's exit */
 		pr_err("driver version " PANEL_VERSION " disabled.\n");
@@ -2367,9 +2359,6 @@ static int __init panel_init_module(void)
 	else
 		pr_info("driver version " PANEL_VERSION
 			" not yet registered\n");
-	/* tells various subsystems about the fact that initialization
-	   is finished */
-	init_in_progress = 0;
 	return parport_register_driver(&panel_driver);
 }
 
-- 
1.8.1.2


  parent reply	other threads:[~2015-03-08 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 17:37 [PATCH 1/3] staging: panel: register reboot Sudip Mukherjee
2015-03-08 17:37 ` [PATCH 2/3] staging: panel: return register value Sudip Mukherjee
2015-03-09  6:30   ` Willy Tarreau
2015-03-09 13:35     ` Sudip Mukherjee
2015-03-09 15:05       ` Willy Tarreau
2015-03-08 17:37 ` Sudip Mukherjee [this message]
2015-03-09  6:20   ` [PATCH 3/3] staging: panel: remove initialization check Willy Tarreau
2015-03-09  6:19 ` [PATCH 1/3] staging: panel: register reboot Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425836246-15355-3-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@meta-x.org \
    --subject='Re: [PATCH 3/3] staging: panel: remove initialization check' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).