Patchwork [22/26] hotkey: remove redundant framework parameter from hotkey_find_keymap

login
register
mail settings
Submitter Colin King
Date Oct. 14, 2012, 8:32 p.m.
Message ID <1350246738-31699-23-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/191416/
State Accepted
Headers show

Comments

Colin King - Oct. 14, 2012, 8:32 p.m.
From: Colin Ian King <colin.king@canonical.com>

We don't need to pass the fwts_framework pointer to hotkey_find_keymap
so remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/hotkey/hotkey/hotkey.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Alex Hung - Oct. 15, 2012, 6:38 a.m.
On 10/15/2012 04:32 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We don't need to pass the fwts_framework pointer to hotkey_find_keymap
> so remove it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/hotkey/hotkey/hotkey.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
> index dfd8888..7602e89 100644
> --- a/src/hotkey/hotkey/hotkey.c
> +++ b/src/hotkey/hotkey/hotkey.c
> @@ -175,7 +175,7 @@ static char *hotkey_find_keyboard(fwts_framework *fw, char *path)
>   	return dev;
>   }
>
> -static char *hotkey_find_keymap(fwts_framework *fw, char *device)
> +static char *hotkey_find_keymap(char *device)
>   {
>   	fwts_list *output;
>   	fwts_list_link *item;
> @@ -210,7 +210,7 @@ static int hotkey_init(fwts_framework *fw)
>   		fwts_log_error(fw, "Cannot find keyboard for this machine.");
>   		return FWTS_ERROR;
>   	}
> -	if ((hotkey_keymap = hotkey_find_keymap(fw, hotkey_dev)) == NULL) {
> +	if ((hotkey_keymap = hotkey_find_keymap(hotkey_dev)) == NULL) {
>   		fwts_log_error(fw, "Cannot determine keymap for this machine.");
>   		return FWTS_ERROR;
>   	}
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - Oct. 17, 2012, 7:56 a.m.
On Mon, Oct 15, 2012 at 4:32 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> We don't need to pass the fwts_framework pointer to hotkey_find_keymap
> so remove it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/hotkey/hotkey/hotkey.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
> index dfd8888..7602e89 100644
> --- a/src/hotkey/hotkey/hotkey.c
> +++ b/src/hotkey/hotkey/hotkey.c
> @@ -175,7 +175,7 @@ static char *hotkey_find_keyboard(fwts_framework *fw, char *path)
>         return dev;
>  }
>
> -static char *hotkey_find_keymap(fwts_framework *fw, char *device)
> +static char *hotkey_find_keymap(char *device)
>  {
>         fwts_list *output;
>         fwts_list_link *item;
> @@ -210,7 +210,7 @@ static int hotkey_init(fwts_framework *fw)
>                 fwts_log_error(fw, "Cannot find keyboard for this machine.");
>                 return FWTS_ERROR;
>         }
> -       if ((hotkey_keymap = hotkey_find_keymap(fw, hotkey_dev)) == NULL) {
> +       if ((hotkey_keymap = hotkey_find_keymap(hotkey_dev)) == NULL) {
>                 fwts_log_error(fw, "Cannot determine keymap for this machine.");
>                 return FWTS_ERROR;
>         }
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
index dfd8888..7602e89 100644
--- a/src/hotkey/hotkey/hotkey.c
+++ b/src/hotkey/hotkey/hotkey.c
@@ -175,7 +175,7 @@  static char *hotkey_find_keyboard(fwts_framework *fw, char *path)
 	return dev;
 }
 
-static char *hotkey_find_keymap(fwts_framework *fw, char *device)
+static char *hotkey_find_keymap(char *device)
 {
 	fwts_list *output;
 	fwts_list_link *item;
@@ -210,7 +210,7 @@  static int hotkey_init(fwts_framework *fw)
 		fwts_log_error(fw, "Cannot find keyboard for this machine.");
 		return FWTS_ERROR;
 	}
-	if ((hotkey_keymap = hotkey_find_keymap(fw, hotkey_dev)) == NULL) {
+	if ((hotkey_keymap = hotkey_find_keymap(hotkey_dev)) == NULL) {
 		fwts_log_error(fw, "Cannot determine keymap for this machine.");
 		return FWTS_ERROR;
 	}