Patchwork [5/8] lib: fwts_keymap.c: add more comments

login
register
mail settings
Submitter Colin King
Date May 25, 2012, 10:40 a.m.
Message ID <1337942453-30224-6-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/161281/
State Accepted
Headers show

Comments

Colin King - May 25, 2012, 10:40 a.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_keymap.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)
Keng-Yu Lin - May 31, 2012, 6:50 a.m.
On Fri, May 25, 2012 at 6:40 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_keymap.c |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/src/lib/src/fwts_keymap.c b/src/lib/src/fwts_keymap.c
> index f4647e1..10c5e3b 100644
> --- a/src/lib/src/fwts_keymap.c
> +++ b/src/lib/src/fwts_keymap.c
> @@ -24,6 +24,10 @@
>
>  #include "fwts.h"
>
> +/*
> + *  fwts_keymap_keycode_free()
> + *     free keymap data
> + */
>  static void fwts_keymap_keycode_free(void *data)
>  {
>        fwts_keycode *keycode = (fwts_keycode*)data;
> @@ -32,11 +36,20 @@ static void fwts_keymap_keycode_free(void *data)
>        free(keycode);
>  }
>
> +/*
> + *  fwts_keymap_free()
> + *     free keymap list
> + */
>  void fwts_keymap_free(fwts_list *keylist)
>  {
>        fwts_list_free(keylist, fwts_keymap_keycode_free);
>  }
>
> +/*
> + *  fwts_keymap_load()
> + *     try and load keymap data for a given machine, return keymap
> + *     in a list of keymap items.
> + */
>  fwts_list *fwts_keymap_load(const char *machine)
>  {
>        FILE *fp;
> @@ -107,6 +120,10 @@ fwts_list *fwts_keymap_load(const char *machine)
>        return keymap_list;
>  }
>
> +/*
> + *  fwts_keymap_find_scancode()
> + *     try and find a keycode for a given scancode in a given keymap list
> + */
>  fwts_keycode *fwts_keymap_find_scancode(fwts_list *keymap, const int scancode)
>  {
>        fwts_list_link *item;
> --
> 1.7.10
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Ivan Hu - June 1, 2012, 1:41 a.m.
On 05/25/2012 06:40 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/lib/src/fwts_keymap.c |   17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
>
> diff --git a/src/lib/src/fwts_keymap.c b/src/lib/src/fwts_keymap.c
> index f4647e1..10c5e3b 100644
> --- a/src/lib/src/fwts_keymap.c
> +++ b/src/lib/src/fwts_keymap.c
> @@ -24,6 +24,10 @@
>
>   #include "fwts.h"
>
> +/*
> + *  fwts_keymap_keycode_free()
> + *	free keymap data
> + */
>   static void fwts_keymap_keycode_free(void *data)
>   {
>   	fwts_keycode *keycode = (fwts_keycode*)data;
> @@ -32,11 +36,20 @@ static void fwts_keymap_keycode_free(void *data)
>   	free(keycode);
>   }
>
> +/*
> + *  fwts_keymap_free()
> + *	free keymap list
> + */
>   void fwts_keymap_free(fwts_list *keylist)
>   {
>   	fwts_list_free(keylist, fwts_keymap_keycode_free);
>   }
>
> +/*
> + *  fwts_keymap_load()
> + *	try and load keymap data for a given machine, return keymap
> + *	in a list of keymap items.
> + */
>   fwts_list *fwts_keymap_load(const char *machine)
>   {	
>   	FILE *fp;
> @@ -107,6 +120,10 @@ fwts_list *fwts_keymap_load(const char *machine)
>   	return keymap_list;
>   }
>
> +/*
> + *  fwts_keymap_find_scancode()
> + *	try and find a keycode for a given scancode in a given keymap list
> + */
>   fwts_keycode *fwts_keymap_find_scancode(fwts_list *keymap, const int scancode)
>   {
>   	fwts_list_link *item;
Acked-by: Ivan Hu<ivan.hu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_keymap.c b/src/lib/src/fwts_keymap.c
index f4647e1..10c5e3b 100644
--- a/src/lib/src/fwts_keymap.c
+++ b/src/lib/src/fwts_keymap.c
@@ -24,6 +24,10 @@ 
 
 #include "fwts.h"
 
+/*
+ *  fwts_keymap_keycode_free()
+ *	free keymap data
+ */
 static void fwts_keymap_keycode_free(void *data)
 {
 	fwts_keycode *keycode = (fwts_keycode*)data;
@@ -32,11 +36,20 @@  static void fwts_keymap_keycode_free(void *data)
 	free(keycode);
 }
 
+/*
+ *  fwts_keymap_free()
+ *	free keymap list
+ */
 void fwts_keymap_free(fwts_list *keylist)
 {
 	fwts_list_free(keylist, fwts_keymap_keycode_free);
 }
 
+/*
+ *  fwts_keymap_load()
+ *	try and load keymap data for a given machine, return keymap
+ *	in a list of keymap items.
+ */
 fwts_list *fwts_keymap_load(const char *machine)
 {	
 	FILE *fp;
@@ -107,6 +120,10 @@  fwts_list *fwts_keymap_load(const char *machine)
 	return keymap_list;
 }
 
+/*
+ *  fwts_keymap_find_scancode()
+ *	try and find a keycode for a given scancode in a given keymap list
+ */
 fwts_keycode *fwts_keymap_find_scancode(fwts_list *keymap, const int scancode)
 {
 	fwts_list_link *item;