Re: [patch] iio: mxs-lradc: use helper functions to simplify the code

2013-09-06 Thread Dan Carpenter
On Fri, Sep 06, 2013 at 09:01:01AM +0200, Jürgen Beisert wrote: Oh, I did the same yesterday in preparation of the v2 of my patch series. I will send this new version out today. Ah fine. Then let's drop my version. regards, dan carpenter ___

Re: [patch] iio: mxs-lradc: use helper functions to simplify the code

2013-09-06 Thread Russell King - ARM Linux
On Thu, Sep 05, 2013 at 05:15:02PM -0300, Fabio Estevam wrote: Looks good, just one minor suggestion: On Thu, Sep 5, 2013 at 3:16 PM, Dan Carpenter dan.carpen...@oracle.com wrote: +static void lradc_reg_set(struct mxs_lradc *lradc, u32 val, size_t chan) +{ + writel(val,

[PATCH 1/5] Staging/iio/adc/touchscreen/MXS: distinguish i.MX23's and i.MX28's LRADC

2013-09-06 Thread Juergen Beisert
The LRADC units in i.MX23 and i.MX28 differ and we need to distinguish both SoC variants in order to make the touchscreen work on i.MX23 Signed-off-by: Juergen Beisert j...@pengutronix.de CC: linux-arm-ker...@lists.infradead.org CC: de...@driverdev.osuosl.org CC: Marek Vasut ma...@denx.de CC:

[PATCH 2/5] Staging/iio/adc/touchscreen/MXS: separate i.MX28 specific register bits

2013-09-06 Thread Juergen Beisert
In order to support i.MX23 and i.MX28 within one driver we need to separate the register definitions which differ in both SoC variants. Signed-off-by: Juergen Beisert j...@pengutronix.de CC: linux-arm-ker...@lists.infradead.org CC: de...@driverdev.osuosl.org CC: Marek Vasut ma...@denx.de CC:

[PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Juergen Beisert
For battery driven systems it is a very bad idea to collect the touchscreen data within a kernel busy loop. This change uses the features of the hardware to delay and accumulate samples in hardware to avoid a high interrupt and CPU load. Note: this is only tested on a i.MX23 SoC yet.

[PATCH 5/5] Staging/iio/adc/touchscreen/MXS: Remove old touchscreen detection implementation

2013-09-06 Thread Juergen Beisert
Signed-off-by: Juergen Beisert j...@pengutronix.de CC: linux-arm-ker...@lists.infradead.org CC: de...@driverdev.osuosl.org CC: Marek Vasut ma...@denx.de CC: Fabio Estevam fabio.este...@freescale.com CC: Jonathan Cameron ji...@cam.ac.uk --- drivers/staging/iio/adc/mxs-lradc.c | 165

Re: [PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Dan Carpenter
On Fri, Sep 06, 2013 at 12:08:42PM +0200, Juergen Beisert wrote: +static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc) +{ + u32 reg; + int val; + + reg = readl(lradc-base + LRADC_CTRL1); + + /* only channels 3 to 5 are of interest here */ + if (reg

Re: [PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Jürgen Beisert
On Friday 06 September 2013 14:26:11 Dan Carpenter wrote: On Fri, Sep 06, 2013 at 12:08:42PM +0200, Juergen Beisert wrote: +static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc) +{ + u32 reg; + int val; + + reg = readl(lradc-base + LRADC_CTRL1); + + /* only

[PATCH] staging: r8188eu: Fix uninitialized variable change_inx

2013-09-06 Thread Geert Uytterhoeven
drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘WMMOnAssocRsp’: drivers/staging/rtl8188eu/core/rtw_wlan_util.c:634: warning: ‘change_inx’ may be used uninitialized in this function And the compiler is right: change_inx should be initialized to false. Signed-off-by: Geert

Re: [PATCH 4/5] Staging/iio/adc/touchscreen/MXS: add interrupt driven touch detection

2013-09-06 Thread Marek Vasut
Dear Jürgen Beisert, On Friday 06 September 2013 14:26:11 Dan Carpenter wrote: On Fri, Sep 06, 2013 at 12:08:42PM +0200, Juergen Beisert wrote: +static int mxs_lradc_read_ts_channel(struct mxs_lradc *lradc) +{ + u32 reg; + int val; + + reg = readl(lradc-base + LRADC_CTRL1);

[PATCH 1/2] staging: zram: minimize `slot_free_lock' usage

2013-09-06 Thread Sergey Senozhatsky
Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process will see NULL slot_free_rq. handle_pending_slot_free() only when current detects that slot_free_rq is not NULL. Signed-off-by: Sergey Senozhatsky

[PATCH 2/2] staging: zram: remove init_done from zram struct

2013-09-06 Thread Sergey Senozhatsky
`zram-init_done != 0' equals to `zram-meta != NULL', so init_done can be removed. Signed-off-by: Sergey Senozhatsky sergey.senozhat...@gmail.com --- drivers/staging/zram/zram_drv.c | 18 +++--- drivers/staging/zram/zram_drv.h | 1 - 2 files changed, 7 insertions(+), 12

Re: [PATCH 2/2] staging: zram: remove init_done from zram struct

2013-09-06 Thread Denis Kirjanov
I'm not familiar with the zram code, but looking through the code and init_done flag it's obvious what is going on rather then looking at zram-meta field checks. On 9/6/13, Sergey Senozhatsky sergey.senozhat...@gmail.com wrote: `zram-init_done != 0' equals to `zram-meta != NULL', so init_done

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage

2013-09-06 Thread Jerome Marchand
On 09/06/2013 03:47 PM, Sergey Senozhatsky wrote: Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process will see NULL slot_free_rq. handle_pending_slot_free() only when current detects that slot_free_rq is not NULL.

Re: [PATCH 2/2] staging: zram: remove init_done from zram struct

2013-09-06 Thread Jerome Marchand
On 09/06/2013 03:52 PM, Sergey Senozhatsky wrote: `zram-init_done != 0' equals to `zram-meta != NULL', so init_done can be removed. The name init_done is self explanatory, meta isn't. You could for instance write a function with an explicit name to test for initialization. Jerome

Re: [PATCH] staging: r8188eu: Fix uninitialized variable change_inx

2013-09-06 Thread Geert Uytterhoeven
On Fri, Sep 6, 2013 at 4:42 PM, Larry Finger larry.fin...@lwfinger.net wrote: On 09/06/2013 07:45 AM, Geert Uytterhoeven wrote: drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘WMMOnAssocRsp’: drivers/staging/rtl8188eu/core/rtw_wlan_util.c:634: warning: ‘change_inx’ may be used

Re: [PATCH 1/2] staging: zram: minimize `slot_free_lock' usage

2013-09-06 Thread Sergey Senozhatsky
On (09/06/13 16:42), Jerome Marchand wrote: On 09/06/2013 03:47 PM, Sergey Senozhatsky wrote: Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process will see NULL slot_free_rq. handle_pending_slot_free() only

[PATCH 2/2] staging: zram: remove init_done from zram struct (v2)

2013-09-06 Thread Sergey Senozhatsky
`zram-init_done' in fact mimics `zram-meta != NULL' value. Introduce init_done() function that checks zram-meta (iow, checks if initialisation was performed), so `zram-init_done' can be removed. v2: introduce init_done() Signed-off-by: Sergey Senozhatsky sergey.senozhat...@gmail.com ---

Re: [PATCH 2/2] staging: zram: remove init_done from zram struct

2013-09-06 Thread Sergey Senozhatsky
On (09/06/13 16:50), Jerome Marchand wrote: On 09/06/2013 03:52 PM, Sergey Senozhatsky wrote: `zram-init_done != 0' equals to `zram-meta != NULL', so init_done can be removed. The name init_done is self explanatory, meta isn't. You could for instance write a function with an explicit name

[PATCH 1/2] staging: zram: minimize `slot_free_lock' usage (v2)

2013-09-06 Thread Sergey Senozhatsky
Calling handle_pending_slot_free() for every RW operation may cause unneccessary slot_free_lock locking, because most likely process will see NULL slot_free_rq. handle_pending_slot_free() only when current detects that slot_free_rq is not NULL. v2: protect handle_pending_slot_free() with zram

[PATCH 3/3] staging: wlan-ng: hfa384x_usb.c: replaced printk() debugs with netdev_warn()/netdev_err()

2013-09-06 Thread Avinash Kumar
replaced the printk debug lines with respective netdev_warn()/netdev_err() Signed-off-by: Avinash kumar avi.kp@gmail.com --- drivers/staging/wlan-ng/hfa384x_usb.c | 90 - 1 file changed, 45 insertions(+), 45 deletions(-) diff --git

[PATCH v2 1/6] staging: dgnc: renames board_t to dgnc_board

2013-09-06 Thread Lidza Louina
This patch renames the struct board_t to dgnc_board. board_t wasn't a good name for it since the _t suffix is for typedefs. Signed-off-by: Lidza Louina lidza.lou...@gmail.com --- drivers/staging/dgnc/dgnc_cls.c| 14 +-- drivers/staging/dgnc/dgnc_driver.c | 20 +++

[PATCH v2 6/6] staging: dgnc: changes arguments in sizeof

2013-09-06 Thread Lidza Louina
The arguments that are passed into sizeof were generic. This patch changes this by putting the actual item that we need a size of instead. For example: - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(brd), GFP_KERNEL); Signed-off-by: Lidza Louina lidza.lou...@gmail.com ---

[PATCH v2 3/6] staging: dgnc: removes casting around kzalloc

2013-09-06 Thread Lidza Louina
This patch removes casting around kzalloc calls. The casts aren't needed because kzalloc returns a void pointer. Signed-off-by: Lidza Louina lidza.lou...@gmail.com --- drivers/staging/dgnc/dgnc_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 5/6] staging: dgnc: removes LINUX_VERSION_CODE conditionals

2013-09-06 Thread Lidza Louina
This patch removes the conditionals that make sure the driver supports various versions of the kernel. They aren't needed. Signed-off-by: Lidza Louina lidza.lou...@gmail.com --- drivers/staging/dgnc/dgnc_driver.c | 12 drivers/staging/dgnc/dgnc_kcompat.h | 24 ---

Re: [PATCH v2 6/6] staging: dgnc: changes arguments in sizeof

2013-09-06 Thread Dan Carpenter
On Fri, Sep 06, 2013 at 04:48:32PM -0400, Lidza Louina wrote: The arguments that are passed into sizeof were generic. This patch changes this by putting the actual item that we need a size of instead. For example: - kzalloc(sizeof(struct dgnc_board), GFP_KERNEL); + kzalloc(sizeof(brd),