Re: [PATCH 33/50] staging: omap-thermal: refactor APIs handling threshold values

2013-03-16 Thread Dan Carpenter
On Fri, Mar 15, 2013 at 09:00:21AM -0400, Eduardo Valentin wrote: if (ret) { dev_err(bg_ptr-dev, failed to read thot\n); - return -EIO; + ret = -EIO; + goto exit; } - *thot = temp; + *val = temp; +exit:

Re: [PATCH 33/50] staging: omap-thermal: refactor APIs handling threshold values

2013-03-16 Thread Eduardo Valentin
On 16-03-2013 04:39, Dan Carpenter wrote: On Fri, Mar 15, 2013 at 09:00:21AM -0400, Eduardo Valentin wrote: if (ret) { dev_err(bg_ptr-dev, failed to read thot\n); - return -EIO; + ret = -EIO; + goto exit; } - *thot

Re: [PATCH 33/50] staging: omap-thermal: refactor APIs handling threshold values

2013-03-16 Thread Dan Carpenter
On Sat, Mar 16, 2013 at 08:49:20AM -0400, Eduardo Valentin wrote: On 16-03-2013 04:39, Dan Carpenter wrote: On Fri, Mar 15, 2013 at 09:00:21AM -0400, Eduardo Valentin wrote: if (ret) { dev_err(bg_ptr-dev, failed to read thot\n); - return -EIO; + ret =

[PATCH 33/50] staging: omap-thermal: refactor APIs handling threshold values

2013-03-15 Thread Eduardo Valentin
This patch improves the code that handles threshold values by creating single functions that are usable for tcold and thot. This way we won't have duplicated functionality just because it is handling different bitfields. Now the added functions are reused in several places where it is needed to