Input: gpio-keys - simplify argument list for report_event

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, October 16, 2008 - 12:16 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ce25d7...
Commit:     ce25d7e90c7543f0046c3bdcdcc7594546c57dcc
Parent:     57ffe9d539e0eb741bb9ca8f2834d210e70ee2e3
Author:     Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
AuthorDate: Fri Aug 8 12:14:36 2008 -0400
Committer:  Dmitry Torokhov <dmitry.torokhov@gmail.com>
CommitDate: Fri Aug 8 12:20:22 2008 -0400

    Input: gpio-keys - simplify argument list for report_event
    
    For now this only saves a few instructions (for gpio_keys_report_event,
    gpio_keys_isr and gpio_check_button one instraction each on ARM using
    arm-linux-gnu-gcc 4.2.3---I assume this is similar for other arch/compiler
    combinations).
    
    Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
    Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/input/keyboard/gpio_keys.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index e2809d2..fe22ca3 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -37,9 +37,10 @@ struct gpio_keys_drvdata {
 	struct gpio_button_data data[0];
 };
 
-static void gpio_keys_report_event(struct gpio_keys_button *button,
-				   struct input_dev *input)
+static void gpio_keys_report_event(struct gpio_button_data *bdata)
 {
+	struct gpio_keys_button *button = bdata->button;
+	struct input_dev *input = bdata->input;
 	unsigned int type = button->type ?: EV_KEY;
 	int state = (gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low;
 
@@ -51,7 +52,7 @@ static void gpio_check_button(unsigned long _data)
 {
 	struct gpio_button_data *data = (struct gpio_button_data *)_data;
 
-	gpio_keys_report_event(data->button, data->input);
+	gpio_keys_report_event(data);
 }
 
 static irqreturn_t gpio_keys_isr(int irq, void *dev_id)
@@ -65,7 +66,7 @@ static irqreturn_t gpio_keys_isr(int irq, void *dev_id)
 		mod_timer(&bdata->timer,
 			jiffies + msecs_to_jiffies(button->debounce_interval));
 	else
-		gpio_keys_report_event(button, bdata->input);
+		gpio_keys_report_event(bdata);
 
 	return IRQ_HANDLED;
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Input: gpio-keys - simplify argument list for report_event, Linux Kernel Mailing ..., (Thu Oct 16, 12:16 pm)