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

2015-02-06 Thread Krzysztof Kozlowski
On pią, 2015-02-06 at 14:49 +0100, Pavel Machek wrote: On Fri 2015-01-30 15:47:58, Krzysztof Kozlowski wrote: Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej

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

2015-01-30 Thread Krzysztof Kozlowski
exists one. [1] https://lkml.org/lkml/2014/11/4/527 [2] https://lkml.org/lkml/2014/10/16/89 [3] https://lkml.org/lkml/2015/1/21/471 Best regards, Krzysztof Krzysztof Kozlowski (20): power_supply: Add driver private data power_supply: Move run-time configuration to separate structure

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

2015-01-30 Thread Krzysztof Kozlowski
, for example: struct some_driver_info { struct i2c_client *client; struct power_supply *power_supply; ... } In such case one cannot use container_of() and must store pointer to state container as private data. Signed-off-by: Krzysztof Kozlowski k.kozlow

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

2015-01-30 Thread Krzysztof Kozlowski
- power_supply_property_is_writeable Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Jonghwa Lee jonghwa3@samusng.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-01-30 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 k.kozlow...@samsung.com Acked

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

2015-01-30 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 k.kozlow...@samsung.com Acked

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

2015-01-30 Thread Krzysztof Kozlowski
is still needed to fully fix race conditions in accessing freed power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- drivers/power/power_supply_core.c | 47

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

2015-01-30 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 v3 12/20] power_supply: Add power_supply_put for decrementing device reference counter

2015-01-30 Thread Krzysztof Kozlowski
power_supply_put() for decrementing the reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- drivers/power/power_supply_core.c | 38

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

2015-01-30 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 k.kozlow...@samsung.com Acked

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

2015-01-30 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-01-30 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-01-30 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

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

2015-01-30 Thread Krzysztof Kozlowski
of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com --- drivers/power/power_supply_core.c | 17 +++-- 1 file changed, 15 insertions

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

2015-01-30 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Lee Jones lee.jo...@linaro.org Reviewed-by: Bartlomiej

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

2015-01-30 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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz

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

2015-01-30 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

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

2015-01-30 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/arm/mach-pxa/raumfeld.c | 4 +++- 1

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

2015-02-09 Thread Krzysztof Kozlowski
On pon, 2015-02-09 at 20:02 +0100, Stefan Wahren wrote: Hi Krzysztof, Krzysztof Kozlowski k.kozlow...@samsung.com hat am 30. Januar 2015 um 15:47 geschrieben: Replace direct calls to power supply function attributes with wrappers. Wrappers provide safe access in case

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

2015-02-09 Thread Krzysztof Kozlowski
On pią, 2015-02-06 at 15:59 +0100, Pavel Machek wrote: On Fri 2015-02-06 15:43:08, Krzysztof Kozlowski wrote: On pią, 2015-02-06 at 14:49 +0100, Pavel Machek wrote: On Fri 2015-01-30 15:47:58, Krzysztof Kozlowski wrote: Use power_supply_put() to decrement the power supply's device

[PATCH v6 09/22] mfd: ab8500: Use power_supply_*() API for accessing function attrs

2015-03-10 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 k.kozlow...@samsung.com Acked

[PATCH v6 19/22] power_supply: 88pm860x_charger: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH v6 17/22] x86/olpc/xo1/sci: Use newly added power_supply_put API

2015-03-10 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[PATCH v6 15/22] power_supply: Increment power supply use counter when obtaining references

2015-03-10 Thread Krzysztof Kozlowski
of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com --- drivers/power/power_supply_core.c | 17 +++-- 1 file changed, 15 insertions

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

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Robert Jarzmik robert.jarz

[PATCH v6 18/22] x86/olpc/xo15/sci: Use newly added power_supply_put API

2015-03-10 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[PATCH v6 10/22] power_supply: apm_power: Use power_supply_*() API for accessing function attrs

2015-03-10 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 k.kozlow...@samsung.com Acked

[PATCH v6 12/22] power_supply: charger-manager: Use power_supply_*() API for accessing function attrs

2015-03-10 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 k.kozlow...@samsung.com Acked

[PATCH v6 02/22] compal-laptop: Check return value of power_supply_register

2015-03-10 Thread Krzysztof Kozlowski
power_supply_unregister() unconditionally cleans up given power supply. Fix this by checking return status of power_supply_register() call. In case of failure, clean up sysfs entries and fail the probe. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: 9be0fcb5ed46 (compal-laptop: add JHL90, battery

[PATCH v6 06/22] power_supply: sysfs: Use power_supply_*() API for accessing function attrs

2015-03-10 Thread Krzysztof Kozlowski
- power_supply_property_is_writeable Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Jonghwa Lee jonghwa3@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH v6 08/22] power_supply: ab8500: Use power_supply_*() API for accessing function attrs

2015-03-10 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 k.kozlow...@samsung.com Acked

[PATCH v6 16/22] power_supply: charger-manager: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH v6 00/22] power_supply: Allow safe usage of power supply

2015-03-10 Thread Krzysztof Kozlowski
/1/21/471 [2] https://lkml.org/lkml/2015/2/20/150 Best regards, Krzysztof Krzysztof Kozlowski (22): compal-laptop: Fix leaking hwmon device compal-laptop: Check return value of power_supply_register power_supply: Add driver private data power_supply: Move run-time configuration

[PATCH v6 03/22] power_supply: Add driver private data

2015-03-10 Thread Krzysztof Kozlowski
, for example: struct some_driver_info { struct i2c_client *client; struct power_supply *power_supply; ... } In such case one cannot use container_of() and must store pointer to state container as private data. Signed-off-by: Krzysztof Kozlowski k.kozlow

[PATCH v6 01/22] compal-laptop: Fix leaking hwmon device

2015-03-10 Thread Krzysztof Kozlowski
failure. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Fixes: c2be45f09bb0 (compal-laptop: Use devm_hwmon_device_register_with_groups) Cc: sta...@vger.kernel.org Acked-by: Guenter Roeck li...@roeck-us.net Acked-by: Darren Hart dvh...@linux.intel.com --- Changes since previous

[PATCH v6 21/22] mfd: ab8500: Decrement the power supply's device reference counter

2015-03-10 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Lee Jones lee.jo...@linaro.org Reviewed-by: Bartlomiej

[PATCH v6 14/22] power_supply: Add power_supply_put for decrementing device reference counter

2015-03-10 Thread Krzysztof Kozlowski
power_supply_put() for decrementing the reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- drivers/power/power_supply_core.c | 38

[PATCH v6 11/22] power_supply: bq2415x_charger: Use power_supply_*() API for accessing function attrs

2015-03-10 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 k.kozlow...@samsung.com Acked

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

2015-02-27 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

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

2015-02-27 Thread Krzysztof Kozlowski
Replace direct usage of put_device() with new API: power_supply_put(). Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

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

2015-02-27 Thread Krzysztof Kozlowski
then it should allocate config on stack and initialize it with proper values. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz [for the nvec part] Reviewed-by: Marc Dietrich marvi...@gmx.de

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

2015-02-27 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 k.kozlow...@samsung.com Acked

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

2015-02-27 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Lee Jones lee.jo...@linaro.org Reviewed-by: Bartlomiej

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

2015-02-27 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-02-27 Thread Krzysztof Kozlowski
of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com --- drivers/power/power_supply_core.c | 17 +++-- 1 file changed, 15 insertions

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

2015-02-27 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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz

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

2015-02-27 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Robert Jarzmik robert.jarz

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

2015-02-27 Thread Krzysztof Kozlowski
Use power_supply_put() to decrement the power supply's device reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-02-27 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 v5 00/20] power_supply: Allow safe usage of power supply

2015-02-27 Thread Krzysztof Kozlowski
, Krzysztof Krzysztof Kozlowski (20): power_supply: Add driver private data power_supply: Move run-time configuration to separate structure power_supply: Add API for safe access of power supply function attrs power_supply: sysfs: Use power_supply_*() API for accessing function attrs

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

2015-02-27 Thread Krzysztof Kozlowski
is still needed to fully fix race conditions in accessing freed power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Pavel Machek pa...@ucw.cz --- drivers

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

2015-02-27 Thread Krzysztof Kozlowski
- power_supply_property_is_writeable Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Jonghwa Lee jonghwa3@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-02-27 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 k.kozlow...@samsung.com Acked

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

2015-02-27 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 k.kozlow...@samsung.com Acked

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

2015-02-27 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 k.kozlow...@samsung.com Acked

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

2015-02-27 Thread Krzysztof Kozlowski
power_supply_put() for decrementing the reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- drivers/power/power_supply_core.c | 38

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

2015-02-23 Thread Krzysztof Kozlowski
is still needed to fully fix race conditions in accessing freed power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Pavel Machek pa...@ucw.cz --- drivers

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

2015-02-23 Thread Krzysztof Kozlowski
then it should allocate config on stack and initialize it with proper values. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz [for the nvec part] Reviewed-by: Marc Dietrich marvi...@gmx.de

[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 k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org Acked-by: Robert Jarzmik robert.jarz

[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 k.kozlow...@samsung.com Acked

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

2015-02-23 Thread Krzysztof Kozlowski
- power_supply_property_is_writeable Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Jonghwa Lee jonghwa3@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[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 k.kozlow...@samsung.com Acked

[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 k.kozlow...@samsung.com Acked

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

2015-02-23 Thread Krzysztof Kozlowski
already exists one. [1] https://lkml.org/lkml/2014/11/4/527 [2] https://lkml.org/lkml/2014/10/16/89 [3] https://lkml.org/lkml/2015/1/21/471 [4] https://lkml.org/lkml/2015/1/29/612 [5] https://lkml.org/lkml/2015/2/20/150 [6] https://lkml.org/lkml/2015/2/20/170 Best regards, Krzysztof Krzysztof

[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 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 k.kozlow...@samsung.com Acked

[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 k.kozlow...@samsung.com Acked

[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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

[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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- arch/x86

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

2015-02-23 Thread Krzysztof Kozlowski
power_supply_put() for decrementing the reference counter. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org --- drivers/power/power_supply_core.c | 38

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

2015-02-23 Thread Krzysztof Kozlowski
, for example: struct some_driver_info { struct i2c_client *client; struct power_supply *power_supply; ... } In such case one cannot use container_of() and must store pointer to state container as private data. Signed-off-by: Krzysztof Kozlowski k.kozlow

[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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz

[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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

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

2015-02-23 Thread Krzysztof Kozlowski
of power_supply_get_property-like functions even when driver unregisters this power supply. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com --- drivers/power/power_supply_core.c | 17 +++-- 1 file changed, 15 insertions

[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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Acked-by: Linus Walleij linus.wall...@linaro.org Acked-by: Lee Jones lee.jo...@linaro.org Reviewed-by: Bartlomiej

[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 k.kozlow...@samsung.com Acked-by: Pavel Machek pa...@ucw.cz Reviewed-by: Bartlomiej Zolnierkiewicz b.zolnier...@samsung.com Reviewed-by: Sebastian Reichel s...@kernel.org

[PATCH 2/2] iio: jsa1212: Constify struct regmap_config

2015-02-24 Thread Krzysztof Kozlowski
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/iio/light/jsa1212.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio

[PATCH 1/2] staging:iio:hmc5843: Constify register tables and struct regmap_config

2015-02-24 Thread Krzysztof Kozlowski
The regmap_access_table and regmap_config structures may be const because they are not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- drivers/staging/iio/magnetometer/hmc5843_i2c.c | 8 drivers/staging

Re: [PATCH 1/2] staging:iio:hmc5843: Constify register tables and struct regmap_config

2015-02-26 Thread Krzysztof Kozlowski
On śro, 2015-02-25 at 11:54 +, Jonathan Cameron wrote: On 24/02/15 09:41, Krzysztof Kozlowski wrote: The regmap_access_table and regmap_config structures may be const because they are not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof

Re: [PATCH v4 11/20] power_supply: Change ownership from driver to core

2015-02-26 Thread Krzysztof Kozlowski
On czw, 2015-02-26 at 01:45 +0100, Sebastian Reichel wrote: Hi, On Mon, Feb 23, 2015 at 12:47:32PM +0100, Krzysztof Kozlowski wrote: Change the ownership of power_supply structure from each driver implementing the class to the power supply core. (...) I would like to merge this via

[PATCH] staging: iio: ad7606_par: Constify platform_device_id

2015-05-01 Thread Krzysztof Kozlowski
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/staging/iio/adc/ad7606_par.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/adc/ad7606_par.c b/drivers

[PATCH] staging: media: omap4iss: Constify platform_device_id

2015-05-01 Thread Krzysztof Kozlowski
The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com --- drivers/staging/media/omap4iss/iss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers

Re: [PATCH v2 3/3] [media] include/media: move platform_data to linux/platform_data/media

2015-11-16 Thread Krzysztof Kozlowski
" > ); > ) >script && . ./script > > Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com> > --- > Documentation/video4linux/omap4_camera.txt| 2 +- > Documentation/video4linux/si4713.txt | 2 +

[PATCH 2/3] staging: media: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/staging/media/lirc

[PATCH 3/3] staging: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/staging/ste_rmi4

[PATCH 1/3] staging: iio: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- drivers/staging/iio/addac

[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-10 Thread Krzysztof Kozlowski
was sent here: http://www.spinics.net/lists/kernel/msg2029903.html Best regards, Krzysztof Krzysztof Kozlowski (3): staging: iio: Drop owner assignment from i2c_driver staging: media: Drop owner assignment from i2c_driver staging: Drop owner assignment from i2c_driver drivers/staging

Re: [PATCH 04/23] mtd: nand: s3c2410: kill the ->ecc_layout field

2015-12-07 Thread Krzysztof Kozlowski
ux/platform_data/mtd-nand-s3c2410.h | 1 - > 3 files changed, 13 deletions(-) Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Best regards, Krzysztof ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4 38/58] mtd: nand: s3c2410: use the mtd instance embedded in struct nand_chip

2015-12-10 Thread Krzysztof Kozlowski
gt;__chipfield) > ) > --->8--- > --- > drivers/mtd/nand/s3c2410.c | 23 ++- > 1 file changed, 14 insertions(+), 9 deletions(-) > Looks correct: Reviewed-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Best regards, Krzysztof ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[RFC 00/15] tree-wide: mfd: syscon: Fix unmet ioremap dependency

2016-03-03 Thread Krzysztof Kozlowski
C18XX_DMAMUX && VIDEO_OMAP4 && HWSPINLOCK_QCOM && ATMEL_ST && QCOM_GSBI && PHY_HI6220_USB) selects MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM) Best regards, Krzysztof Krzysztof Kozlowski (15): clocksource: atmel: Add missing MFD_SYSC

[RFC 12/15] soc: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/soc/qcom/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig

[RFC 10/15] net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/net/ethernet/hisilicon/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/Kconfig | 6 ++ drivers/net/ethernet/ti/K

[RFC 13/15] staging: media: omap4iss: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/staging/media/omap4iss/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/omap4iss/Kconfig b/d

[RFC 11/15] power: reset: keystone: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/power/reset/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/K

[RFC 15/15] mfd: syscon: Fix build of missing ioremap on UM

2016-03-03 Thread Krzysztof Kozlowski
t regmap max_register in of_syscon_register") Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index aa21dc55eb15..2e5b1e525a1d 100644 --- a/drivers/mfd/Kconfig +++

[RFC 09/15] media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/media/platform/Kconfig| 1 + drivers/media/platform/exynos4-is/Kconfig | 1 + 2 files changed, 2 insertions(+)

[RFC 04/15] irqchip: st: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig

[RFC 06/15] pinctrl: rockchip: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/pinctrl/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig

[RFC 02/15] dmaengine: nxp: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/dma/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index c77f21

[RFC 03/15] hwspinlock: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet direct dependencies. Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> --- drivers/hwspinlock/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwspinlock/Kconfig b/drivers/hwspinlock/Kconfig

  1   2   >