Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-11 Thread Tony Lindgren
* Dmitry Torokhov dmitry.torok...@gmail.com [100601 23:07]: On Tue, Jun 01, 2010 at 09:53:58PM +0300, Felipe Balbi wrote: On Tue, Jun 01, 2010 at 05:14:09PM +0200, ext Arce, Abraham wrote: I am using #ifdef CONFIG_ARCH_OMAP4 for this portion of code, what you are suggesting is to check at

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-02 Thread Thomas Petazzoni
On Mon, 31 May 2010 16:44:52 -0500 Arce, Abraham x0066...@ti.com wrote: + unsigned int length = 0, id = 0; + int hw_mod_name_len = 16; + char oh_name[hw_mod_name_len]; + char *name = omap4-keypad; + + length = snprintf(oh_name, hw_mod_name_len, kbd); + + oh =

RE: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-02 Thread Arce, Abraham
Thanks Thomas, + unsigned int length = 0, id = 0; + int hw_mod_name_len = 16; + char oh_name[hw_mod_name_len]; + char *name = omap4-keypad; + + length = snprintf(oh_name, hw_mod_name_len, kbd); + + oh = omap_hwmod_lookup(oh_name); + if (!oh) { +

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-02 Thread Thomas Petazzoni
On Wed, 2 Jun 2010 07:45:07 -0500 Arce, Abraham x0066...@ti.com wrote: I'll remove length variable and keep snprintf, below oh_name - kbd is used again, this will keep name defined in one single place WARN(IS_ERR(od), Could not build omap_device for %s %s\n, name,

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-01 Thread Tony Lindgren
* Arce, Abraham x0066...@ti.com [100601 00:39]: Register keyboard device with hwmod framework Please test this with omap3_defconfig too, and make sure it does not break things for omap2 and omap3. +int omap4_init_kp(struct omap4_keypad_platform_data *kp) +{ + struct omap_hwmod *oh; +

RE: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-01 Thread Arce, Abraham
Hi Tony, Please test this with omap3_defconfig too, and make sure it does not break things for omap2 and omap3. Tested, no problems... +int omap4_init_kp(struct omap4_keypad_platform_data *kp) +{ + struct omap_hwmod *oh; + struct omap_device *od; + struct

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-01 Thread Kevin Hilman
Felipe Balbi felipe.ba...@nokia.com writes: On Tue, Jun 01, 2010 at 06:47:34AM +0200, Balbi Felipe (Nokia-D/Helsinki) wrote: +pdata-device_enable = omap_device_enable; this is undefined at least here or previous patch. or does it come from omap_device layers ?? It's part of the

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-01 Thread Felipe Balbi
On Tue, Jun 01, 2010 at 05:14:09PM +0200, ext Arce, Abraham wrote: I am using #ifdef CONFIG_ARCH_OMAP4 for this portion of code, what you are suggesting is to check at runtime? you need to add both checks. If you build omap3-only or omap2-only you don't want that code to be compiled, but if

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-06-01 Thread Dmitry Torokhov
On Tue, Jun 01, 2010 at 09:53:58PM +0300, Felipe Balbi wrote: On Tue, Jun 01, 2010 at 05:14:09PM +0200, ext Arce, Abraham wrote: I am using #ifdef CONFIG_ARCH_OMAP4 for this portion of code, what you are suggesting is to check at runtime? you need to add both checks. If you build omap3-only

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-05-31 Thread Felipe Balbi
On Mon, May 31, 2010 at 11:44:52PM +0200, ext Arce, Abraham wrote: + pdata = kzalloc(sizeof(struct omap4_keypad_platform_data), GFP_KERNEL); you will never free this. [..] + pdata-device_enable = omap_device_enable; this is undefined at least here or previous patch. +

Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

2010-05-31 Thread Felipe Balbi
On Tue, Jun 01, 2010 at 06:47:34AM +0200, Balbi Felipe (Nokia-D/Helsinki) wrote: + pdata-device_enable = omap_device_enable; this is undefined at least here or previous patch. or does it come from omap_device layers ?? -- balbi DefectiveByDesign.org -- To unsubscribe from this list: