From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932658AbbCIOiz (ORCPT ); Mon, 9 Mar 2015 10:38:55 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:34437 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754375AbbCIOik (ORCPT ); Mon, 9 Mar 2015 10:38:40 -0400 From: Sudip Mukherjee To: Willy Tarreau , Greg Kroah-Hartman Cc: Sudip Mukherjee , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] staging: panel: remove initialization check Date: Mon, 9 Mar 2015 20:08:25 +0530 Message-Id: <1425911905-14780-3-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1425911905-14780-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1425911905-14780-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Willy Tarreau --- v2: same as v1, only it had to be rewritten because of the changes in patch 2/3 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 65872fa..88f7a5b 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"); @@ -2373,9 +2365,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 0; } -- 1.8.1.2