Re: [PATCH] staging/sm7xxfb: Make 'struct vgamode' static

2015-02-23 Thread Sudip Mukherjee
On Mon, Feb 23, 2015 at 12:16:16PM +0100, Peter Senna Tschudin wrote: > sparse was complaining that symbol 'vgamode' was not declared. > > Declaring vgamode as static. a similar patch has already been sent to Greg, which is not yet applied. regards sudip > > Signed-off-by: Peter Senna Tschudin

Re: [PATCH v4 00/20] power_supply: Allow safe usage of power supply

2015-02-23 Thread Pavel Machek
Hi! > > The patchset fixes invalid memory accesses in certain race scenarios by > moving ownership of struct power_supply to the core. All drivers are > modified. Ok, who can apply the patches? Sebastian? Pavel -- (english

[PATCH] staging: comedi: vmk80xx: remove "firmware version" kernel messages

2015-02-23 Thread H Hartley Sweeten
During the attach of this driver a couple commands are sent to the hardware with usb_bulk_msg() to read the firmware version information. This information is then dumped as dev_info() kernel messages. Thee messages are just added noise and don't effect the operation of the driver. For simplicity,

[PATCH v2 34/36] staging: comedi: amplc_dio200_common: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
Convert this driver to use the comedi_8254 module to provide the 8254 timer support. Add 'clock_src' and 'gate_src' members to the comedi_8254 data for convienence. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kconfig

[PATCH v2 36/36] staging: comedi: 8253.h: remove unused header

2015-02-23 Thread H Hartley Sweeten
All the comedi drivers have been converted to use the comedi_8254 module to provide support for the 8254 timers. Remove this unused header. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/8253.h | 347

[PATCH v2 16/36] staging: comedi: ni_at_ao: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
The hardware supported by this driver includes an 8254 timer. This timer is not currently used, other than setting counters 1 and 2 to MODE4 to ensure that the outputs are high. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. This will make it easier

[PATCH v2 20/36] staging: comedi: adv_pci_dio: simplify counter subdevice I/O

2015-02-23 Thread H Hartley Sweeten
Only two of the boards supported by this driver have an 8254 counter/timer. Both of these boards have a single 8254 device. Currently the counter subdevice functions are coded to support multiple 8254 devices. This is unnecessary and just complicates the code. Simplfy the subdevice functions to wo

[PATCH v2 31/36] staging: comedi: amplc_dio200_common: remove 'which' from struct dio200_subdev_8254

2015-02-23 Thread H Hartley Sweeten
This member is only used in the "set gate" and "set clock" helper functions. Remove it and calculate the value when needed. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/amplc_dio200_common.c | 7 ++- 1 file change

[PATCH v2 00/36] staging: comedi: cleanup 8254 timer code

2015-02-23 Thread H Hartley Sweeten
This series introduces a new module. comedi_8254, to support the 8254 timer devices that are commonly found on data acquisition card. This module replaces the current support provided by the inline functions in 8253.h and consolidates the subdevice support code found in the comedi drivers. v2: fix

[PATCH v2 33/36] staging: comedi: amplc_dio200_common: remove 'spinlock' from struct dio200_subdev_8254

2015-02-23 Thread H Hartley Sweeten
Currently this driver uses a spinlock in the 8254 subdevice (*insn_read), (*insn_write), and (*insn_config) functions. The comedi core checks if the subdevice is 'busy', in parse_insn(), before any of the subdevice functions are attempted. Remove the unnecessary spinlock. Signed-off-by: H Hartl

[PATCH v2 01/36] staging: comedi: comedi_8254: introduce module for 8254 timer support

2015-02-23 Thread H Hartley Sweeten
A 8254 timer/counter is commonly used on data acquisition boards to provide the internal pacer clock used to acquire analog input samples. Some boards also to allow the timers to be used externally. Currently the 8254 timers are supported by comedi using the 8253.h header and a number of inline fu

[PATCH v2 17/36] staging: comedi: ni_at_a2150: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
The hardware supported by this driver includes an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kconfig |

[PATCH v2 05/36] staging: comedi: pcl818: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Note that the pacer does not have to be stopped when starting a new async command in pcl818_ai_cmd() or when the card i

[PATCH v2 28/36] staging: comedi: amplc_dio200_common: introduce DIO200_GAT_SEL() macro

2015-02-23 Thread H Hartley Sweeten
Replace the DIO200_[XYZ]GAT_SEL defines with a macro that returns the correct register offset. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/amplc_dio200_common.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH v2 21/36] staging: comedi: adv_pci_dio: refactor 's8254' boardinfo

2015-02-23 Thread H Hartley Sweeten
The boardinfo for the 8254 timer is overly complex. The 8254 timer always has 3 channels and the 'regs' and 'specflags' members of diosubd_data are not used. The only necessary information is the base 'addr' offset to the 8254 registers. Replace the 's8254' member with an unsigned long 'timer_regb

[PATCH v2 35/36] staging: comedi: ni_labpc_common: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. The hardware actually has two 8254 devices. Timer B0 is the master for timed conversions, timer B1 sets the scan pacing,

[PATCH v2 27/36] staging: comedi: amplc_dio200_common: introduce DIO200_CLK_SEL() macro

2015-02-23 Thread H Hartley Sweeten
Replace the DIO200_[XYZ]CLK_SEL defines with a macro that returns the correct register offset. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/amplc_dio200_common.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH v2 29/36] staging: comedi: amplc_dio200_common: remove 'clk_sce_ofs' from struct dio200_subdev_8254

2015-02-23 Thread H Hartley Sweeten
This member is only used one place in the driver. Remove it and calculate the register offset when needed. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/amplc_dio200_common.c | 4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v2 24/36] staging: comedi: cb_pcidas64: remove unnecessary include

2015-02-23 Thread H Hartley Sweeten
The hardware supported by this driver does not have an 8254 timer. Remove the unnecessary include of "8253.h". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/cb_pcidas64.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v2 26/36] staging: comedi: adl_pci9118: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: fix logic error with 'regshift' driv

[PATCH v2 13/36] staging: comedi: adv_pci1710: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. It also provides a comedi_subdevice to allow the user to use channel 0 of the 8254 timer. Currently the subdevice support does not work correctly due to and (*insn_config) that does not follow the com

[PATCH v2 30/36] staging: comedi: amplc_dio200_common: remove 'gat_sce_ofs' from struct dio200_subdev_8254

2015-02-23 Thread H Hartley Sweeten
This member is only used one place in the driver. Remove it and calculate the register offset when needed. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/drivers/amplc_dio200_common.c | 9 ++--- 1 file changed, 2 insertions(

[PATCH v2 32/36] staging: comedi: amplc_dio200_common: remove unnecessary 'counter_number' checks

2015-02-23 Thread H Hartley Sweeten
The 'counter_number' in these functions is the comedi channel number from the chanspec. The comedi core validates the chanspec before calling the driver functions. Remove the unnecessary checks. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/s

[PATCH v2 23/36] staging: comedi: me4000: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
Some of the hardware supported by this driver include an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. This also fixes the (*insn_read) and (*insn_write) to work like the comedi API expects. Currently they only read or write a single va

[PATCH v2 19/36] staging: comedi: das1800: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Tidy up the (*do_cmdtest) validation of the timer arguments. Absorb the converted das1800_setup_counters() code into th

[PATCH v2 18/36] staging: comedi: das6402: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Remove the unnecessary programming of timer 0. The private data 'count' value is never set by the driver and the timer i

[PATCH v2 25/36] staging: comedi: das16: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kco

[PATCH v2 22/36] staging: comedi: adv_pci_dio: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
Some of the hardware supported by this driver includes an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kconfig

[PATCH v2 09/36] staging: comedi: cb_pcidas: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses two 8254 timers to generate the pacer clocks. One for analog input acquisition and one for analog output data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timers. Use the comedi_device 'pacer' member for the 8254 timer used for analog input.

[PATCH v2 08/36] staging: comedi: amplc_pci224: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog output data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kc

[PATCH v2 11/36] staging: comedi: das16m1: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses two 8254 timers. One to generate the analog input pacer clock and one to count the number of samples. Convert it to use the comedi_8254 module to provide support for the 8254 timers. Use the comedi_device 'pacer' member for the 8254 timer used for analog input. This data is free

[PATCH v2 14/36] staging: comedi: amplc_pci230: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kco

[PATCH v2 06/36] staging: comedi: pcl711: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kc

[PATCH v2 07/36] staging: comedi: adl_pci9111: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: fix logic error with 'regshift' dri

[PATCH v2 04/36] staging: comedi: pcl816: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kco

[PATCH v2 15/36] staging: comedi: das08: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
Some of the hardware supported by this driver include an 8254 timer that is exposed to the user as a comedi_subdevice. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drive

[PATCH v2 10/36] staging: comedi: das800: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- v2: no change drivers/staging/comedi/Kc

[PATCH v2 12/36] staging: comedi: cb_das16_cs: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
The hardware supported by this drive has an 8254 timer. Currently this driver does not use the timer functions. For aesthetics, use the comedi_8254 module to provide support for the 8254 timer. This will ensure that the counters are all reset and make it easier to add functionality later. Signed-

[PATCH v2 03/36] staging: comedi: pcl812: convert driver to use the comedi_8254 module

2015-02-23 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Note that the pacer does not have to be stopped when starting a new async command in pcl812_ai_cmd() or when the card i

[PATCH v2 02/36] staging: comedi: add 'pacer' member to struct comedi_device

2015-02-23 Thread H Hartley Sweeten
Add a new member to the comedi_device struct for a comedi_8254 'pacer'. This provides a convient place to store the data allocated by the comedi_8254 module for boards that use an 8254 device to create the data acquisition pacer clock. Automatically free this pointer in comedi_device_detach_cleanu

RE: [RFC PATCH 34/36] staging: comedi: amplc_dio200_common: convert driver to use the comedi_8254 module

2015-02-23 Thread Hartley Sweeten
On Monday, February 23, 2015 11:58 AM, Ian Abbott wrote: > On 20/02/15 23:05, H Hartley Sweeten wrote: >> Convert this driver to use the comedi_8254 module to provide the 8254 timer >> support. >> >> Add 'clock_src' and 'gate_src' members to the comedi_8254 data for >> convienence. >> >> Signed-o

Re: [PATCH 1/4] staging: comedi: vmk80xx: fix out-of-bounds write

2015-02-23 Thread Ian Abbott
On 23/02/15 19:53, Hartley Sweeten wrote: Actually, since the information is just used in kernel log messages can we just remove it? I suppose so. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- _

Re: [PATCH] [RFC] drivers/staging/fbtft: fix sparse warnings

2015-02-23 Thread Andrey Utkin
2015-02-23 21:27 GMT+02:00 Noralf Trønnes : > Yes, it's best to leave this alone for now. > I'm working on a proposal to provide better layering and minimal coupling > to fbdev. This will hopefully lead to screen_base eventually being used > only twice in the fbtft module and nowhere else. Ok, sta

[PATCH] staging: comedi: comedi_isadma: fix "stalled" detect in comedi_isadma_disable_on_sample()

2015-02-23 Thread H Hartley Sweeten
The "stalled" variable this function is used to detect if the DMA operation is stalled while trying to disable DMA on a full comedi sample. The reset of this variable should only occur when the remaining bytes of the DMA transfer does not equal the remaining bytes from the last check. Reported-by:

Re: [PATCH] staging: rtl8723au: rtl8723a_hal_init.c: remove unnecessary braces

2015-02-23 Thread Jes Sorensen
Daniele Alessandrelli writes: > Fix all checkpatch "braces {} are not necessary" warnings for > rtl8723au/hal/rtl8723a_hal_init.c > > Signed-off-by: Daniele Alessandrelli > --- > drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 40 > --- > 1 file changed, 14 insertions(+)

Re: [RFC PATCH 01/36] staging: comedi: comedi_8254: introduce module for 8254 timer support

2015-02-23 Thread Ian Abbott
On 23/02/15 18:31, Hartley Sweeten wrote: On Monday, February 23, 2015 11:06 AM, Ian Abbott wrote: On 20/02/15 23:04, H Hartley Sweeten wrote: + unsigned int val; + + switch (i8254->iosize) { + default: + case I8254_IO8: + if (i8254->mmio) +

Re: [RFC PATCH 34/36] staging: comedi: amplc_dio200_common: convert driver to use the comedi_8254 module

2015-02-23 Thread Ian Abbott
On 20/02/15 23:05, H Hartley Sweeten wrote: Convert this driver to use the comedi_8254 module to provide the 8254 timer support. Add 'clock_src' and 'gate_src' members to the comedi_8254 data for convienence. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drive

Re: [RFC PATCH 26/36] staging: comedi: adl_pci9118: convert driver to use the comedi_8254 module

2015-02-23 Thread Ian Abbott
On 20/02/15 23:05, H Hartley Sweeten wrote: This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman

[PATCH] Staging: fbtft: fix style errors

2015-02-23 Thread Matteo Semenzato
From: Matteo Semenzato This patch fixes the following error: space prohibited before that ',' Signed-off-by: Matteo Semenzato --- drivers/staging/fbtft/fb_ili9340.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/fbtft/fb_ili9340.c b/drivers/stag

[PATCH] Staging: fbtft: fix space errors

2015-02-23 Thread Matteo Semenzato
From: Matteo Semenzato This patch fixes the following error: space prohibited before that ',' Signed-off-by: Matteo Semenzato --- drivers/staging/fbtft/fb_ra8875.c | 150 +++--- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/drivers/staging/fbtf

[PATCH v4 20/20] arm: mach-pxa: Decrement the power supply's device reference counter

2015-02-23 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel Acked-by: Robert Jarzmik --- arch/arm/mach-pxa/raumfeld.c | 4 +++- 1 file changed, 3 insertions(+), 1 dele

[PATCH v4 14/20] power_supply: charger-manager: Decrement the power supply's device reference counter

2015-02-23 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drivers/power/charger-manager.c | 70 +++--

[PATCH v4 18/20] power_supply: bq2415x_charger: Decrement the power supply's device reference counter

2015-02-23 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter (increased by power_supply_get_by_name() or power_supply_get_by_phandle()). Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drive

[PATCH v4 17/20] power_supply: 88pm860x_charger: Decrement the power supply's device reference counter

2015-02-23 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drivers/power/88pm860x_charger.c | 11 +-- 1 file changed, 9 insertions(

[PATCH v4 13/20] power_supply: Increment power supply use counter when obtaining references

2015-02-23 Thread Krzysztof Kozlowski
Increment the power_supply.use_cnt usage counter on: - power_supply_get_by_phandle() - power_supply_get_by_name() and decrement it on power_supply_put() call. This helps tracking of valid usage of power supply instance by consumers. The usage counter itself also allows safe calling of power_supp

[PATCH v4 19/20] mfd: ab8500: Decrement the power supply's device reference counter

2015-02-23 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Acked-by: Linus Walleij Acked-by: Lee Jones Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- drivers/mfd/ab8500-sysctrl.c | 2 +

[PATCH v4 15/20] x86/olpc/xo1/sci: Use newly added power_supply_put API

2015-02-23 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- arch/x86/platform/olpc/olpc-xo1-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

[PATCH v4 16/20] x86/olpc/xo15/sci: Use newly added power_supply_put API

2015-02-23 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski Acked-by: Pavel Machek Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sebastian Reichel --- arch/x86/platform/olpc/olpc-xo15-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[PATCH v4 10/20] power_supply: charger-manager: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonghwa Lee Acked-by: P

[PATCH v4 02/20] power_supply: Move run-time configuration to separate structure

2015-02-23 Thread Krzysztof Kozlowski
Add new structure 'power_supply_config' for holding run-time initialization data like of_node, supplies and private driver data. The power_supply_register() function is changed so all power supply drivers need updating. When registering the power supply this new 'power_supply_config' should be us

[PATCH v4 12/20] power_supply: Add power_supply_put for decrementing device reference counter

2015-02-23 Thread Krzysztof Kozlowski
The power_supply_get_by_phandle() and power_supply_get_by_name() use function class_find_device() for obtaining the reference to power supply. Each use of class_find_device() increases the power supply's device reference counter. However the reference counter was not decreased by users of this API

[PATCH v4 09/20] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonghwa Lee Acked-by: P

[PATCH v4 04/20] power_supply: sysfs: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property - set_property -> power_supply_set_property - property_is_writeable -

[PATCH v4 08/20] power_supply: apm_power: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonghwa Lee Acked-by: P

[PATCH v4 07/20] mfd: ab8500: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonghwa Lee Acked-by: P

[PATCH v4 05/20] power_supply: 88pm860x_charger: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property - set_property -> power_supply_set_property Signed-off-by: Krzysztof

[PATCH v4 06/20] power_supply: ab8500: Use power_supply_*() API for accessing function attrs

2015-02-23 Thread Krzysztof Kozlowski
Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case of unregistering the power supply (e.g. by removing the driver). Replace: - get_property -> power_supply_get_property Signed-off-by: Krzysztof Kozlowski Acked-by: Jonghwa Lee Acked-by: P

[PATCH v4 00/20] power_supply: Allow safe usage of power supply

2015-02-23 Thread Krzysztof Kozlowski
Hi, The patchset fixes invalid memory accesses in certain race scenarios by moving ownership of struct power_supply to the core. All drivers are modified. TLDR for driver and subsystem maintainers = Two patches of patchset change power_supply_register() f

[PATCH v4 03/20] power_supply: Add API for safe access of power supply function attrs

2015-02-23 Thread Krzysztof Kozlowski
Add simple wrappers for accessing power supply's function attributes: - get_property -> power_supply_get_property - set_property -> power_supply_set_property - property_is_writeable -> power_supply_property_is_writeable - external_power_changed -> power_supply_external_power_changed This API a

[PATCH v4 01/20] power_supply: Add driver private data

2015-02-23 Thread Krzysztof Kozlowski
Allow drivers to store private data inside power_supply structure for later usage in power supply operations. Usage of driver private data is necessary to access driver's state container object from power supply calls (like get_property()) if struct 'power_supply' is a stored there as a pointer, f

Re: [PATCH 4/4] staging: comedi: rtd520: remove unnecessary interrupt disable

2015-02-23 Thread Ian Abbott
On 20/02/15 19:52, H Hartley Sweeten wrote: The read/write of the PLX_INTRCS_REG during the driver detach is not necessary. The rtd_reset() function writes 0 to this register which will disable all interrupts. This also fixes a dereference after null check reported by coverity. Reported-by: cov

Re: [PATCH 3/4] staging: comedi: cb_pcidas64: fix possible integer overflow

2015-02-23 Thread Ian Abbott
On 20/02/15 19:52, H Hartley Sweeten wrote: The {min,max}_scan_divisor values could overflow due to the unsigned int * insigned int calculation. Change the type of the local variable 'convert_divisor' to unsigned long long to avoid the possible overflow. Reported-by: coverity (CID 200653) Signed

[PATCH] staging/sm7xxfb: Make 'struct vgamode' static

2015-02-23 Thread Peter Senna Tschudin
sparse was complaining that symbol 'vgamode' was not declared. Declaring vgamode as static. Signed-off-by: Peter Senna Tschudin --- Tested by compilation only drivers/staging/sm7xxfb/sm7xx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/d

Re: [PATCH 2/4] staging: comedi: ni_labpc_common: fix logically dead code issue

2015-02-23 Thread Ian Abbott
On 20/02/15 19:52, H Hartley Sweeten wrote: The quick exit check of (mode == MODE_SINGLE_CHAN) results in coverity reporting a logically dead code issue in the switch code in labpc_ai_check_chanlist(). Remove the quick exit check and allow the function to handle the MODE_SINGLE_CHAN normally (th

Re: [PATCH 1/4] staging: comedi: vmk80xx: fix out-of-bounds write

2015-02-23 Thread Ian Abbott
On 20/02/15 19:52, H Hartley Sweeten wrote: usb_blk_msg() will return the passed 'len' (64) as the 'actual_len' (cnt) of That's usb_bulk_msg(). the transfer. The addition of the '\0' to the end of the returned string will overrun the 'rx' array. Increase the array size by 1 to fix the out-of-