[PATCH] hotkey: remove redundant framework parameter from hotkey_find_keyboard

Keng-Yu Lin kengyu at canonical.com
Wed Oct 17 08:16:24 UTC 2012


On Mon, Oct 15, 2012 at 4:09 PM, Alex Hung <alex.hung at canonical.com> wrote:
> We don't need to pass the fwts_framework pointer to hotkey_find_keyboard
> so remove it.
>
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/hotkey/hotkey/hotkey.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/hotkey/hotkey/hotkey.c b/src/hotkey/hotkey/hotkey.c
> index 7602e89..53b9208 100644
> --- a/src/hotkey/hotkey/hotkey.c
> +++ b/src/hotkey/hotkey/hotkey.c
> @@ -136,7 +136,7 @@ static char *hotkey_device(char *path)
>         return dev;
>  }
>
> -static char *hotkey_find_keyboard(fwts_framework *fw, char *path)
> +static char *hotkey_find_keyboard(char *path)
>  {
>         DIR *dir;
>         struct dirent *entry;
> @@ -155,7 +155,7 @@ static char *hotkey_find_keyboard(fwts_framework *fw, char *path)
>                         lstat(filename, &statbuf);
>                         if (S_ISDIR(statbuf.st_mode)) {
>                                 if (!S_ISLNK(statbuf.st_mode))
> -                                       if ((dev = hotkey_find_keyboard(fw, filename)) != NULL)
> +                                       if ((dev = hotkey_find_keyboard(filename)) != NULL)
>                                                 break;
>                         } else {
>                                 if ((data = fwts_get(filename)) != NULL) {
> @@ -206,7 +206,7 @@ static char *hotkey_find_keymap(char *device)
>
>  static int hotkey_init(fwts_framework *fw)
>  {
> -       if ((hotkey_dev = hotkey_find_keyboard(fw, "/sys/devices/platform")) == NULL) {
> +       if ((hotkey_dev = hotkey_find_keyboard("/sys/devices/platform")) == NULL) {
>                 fwts_log_error(fw, "Cannot find keyboard for this machine.");
>                 return FWTS_ERROR;
>         }
> --
> 1.7.9.5
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list