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>
Acked-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com>
---
The coccinelle script which generated the patch was sent here:
http://www
= (pwm_get_period((haptic->pwm_dev)) + haptic->pwm_duty) / 2;
Double parentheses over argument are not needed so just:
pwm_get_period(haptic->pwm_dev) + ...
Beside that patch looks good, so with removing parentheses here and below:
Reviewed-by: Krzysztof Kozlowski
On 20.10.2015 00:11, Luis de Bethencourt wrote:
> On 13/10/15 02:49, Krzysztof Kozlowski wrote:
>> 2015-10-09 22:00 GMT+09:00 Luis de Bethencourt <lui...@osg.samsung.com>:
>>> Since hid_connect() only cares about hiddev_connect() succeeding or
>>> failing, t
2015-10-09 22:00 GMT+09:00 Luis de Bethencourt :
> Since hid_connect() only cares about hiddev_connect() succeeding or
> failing, there is no need for this function to return an int and it can
> return a bool instead.
It can return bool but it would not be in line with
le changed, 2 insertions(+), 2 deletions(-)
Patch is obvious (actually it could go to trivial tree), so FWIW:
Reviewed-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body
On 03.08.2015 09:01, Krzysztof Kozlowski wrote:
During unbinding the driver was dereferencing a pointer to memory
already freed by power_supply_unregister().
Driver was freeing its internal description of battery through pointers
stored in power_supply structure. However, because the core
power_supply_unregister() this
memory is freed and the driver cannot access these members.
Fix this by storing the pointer to internal description of battery in a
local variable before calling power_supply_unregister(), so the pointer
remains valid.
Signed-off-by: Krzysztof Kozlowski k.kozlow
2015-08-01 21:11 GMT+09:00 Jiri Kosina jkos...@suse.com:
On Wed, 29 Jul 2015, Dmitry Torokhov wrote:
Another and less intrusive fix would be:
char *name = dev-battery-desc-name;
struct power_supply_desc *psy_desc = dev-battery-desc;
power_supply_unregister(dev-battery);
Storing a predefined PWM divisor in state container structure is
meaningless. The field, after initialization, is only read so this only
obfuscates the code. Remove the field and use directly enum value.
Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
Acked-by: Dmitry Torokhov
The max77693 haptic driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com
---
drivers/input/misc/Kconfig | 12 --
drivers/input/misc/Makefile | 1
Prepare the driver for supporting two devices: Maxim 77693 and 77843:
1. Add table of device ids and store current device type for later
usage.
2. Differentiate the haptic device configuration.
Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
Acked-by: Dmitry Torokhov dmitry.torok
2015-07-30 2:46 GMT+09:00 Dmitry Torokhov dmitry.torok...@gmail.com:
On Wed, Jul 29, 2015 at 03:07:04PM +0200, Jiri Kosina wrote:
On Tue, 28 Jul 2015, Krzysztof Kozlowski wrote:
During unbinding the driver was dereferencing a pointer to memory
already freed by power_supply_unregister
Storing a predefined PWM divisor in state container structure is
meaningless. The field, after initialization, is only read so this only
obfuscates the code. Remove the field and use directly enum value.
Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
---
drivers/input/misc/max77693
, then patchset can wait till MFD/regulator
changes reach Linus' tree.
Best regards,
Krzysztof
[0] https://lkml.org/lkml/2015/7/15/554
Krzysztof Kozlowski (4):
Input: max77693: Remove a read-only pwm_divisor field
Input: max77693: Prepare for adding support for Maxim 77843
Input: max77693: Add
-by: Krzysztof Kozlowski k.kozlow...@samsung.com
---
drivers/input/misc/Kconfig | 6 ++---
drivers/input/misc/max77693-haptic.c | 48 +---
2 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
Prepare the driver for supporting two devices: Maxim 77693 and 77843:
1. Add table of device ids and store current device type for later
usage.
2. Differentiate the haptic device configuration.
Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
---
drivers/input/misc/max77693-haptic.c
The max77693 haptic driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/input/misc/Kconfig | 12 --
drivers/input/misc/Makefile | 1 -
drivers/input/misc/max77843-haptic.c | 359
2015-07-29 15:31 GMT+09:00 Krzysztof Kozlowski k.kozlow...@samsung.com:
The max77693 haptic driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Crap, wrong signed-off-by. I'll respin.
Best regards,
Krzysztof
2015-07-30 2:08 GMT+09:00 Dmitry Torokhov dmitry.torok...@gmail.com:
On Wed, Jul 29, 2015 at 03:31:26PM +0900, Krzysztof Kozlowski wrote:
Hi,
Description
===
The Maxim 77843 haptic driver differs from 77693 by:
1. Setting the bias.
2. Different configuration register.
3
On 27.07.2015 22:10, H.J. Lu wrote:
Hi,
This commit:
commit 297d716f6260cc9421d971b124ca196b957ee458
Author: Krzysztof Kozlowski k.kozlow...@samsung.com
Date: Thu Mar 12 08:44:11 2015 +0100
power_supply: Change ownership from driver to core
Change the ownership
The max77693 regulator driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/regulator/Kconfig| 8 --
drivers/regulator/Makefile | 1 -
drivers/regulator/max77843.c | 203
but next patches depend on previous ones.
So probably the easiest way would be picking picked up by one
maintainer.
Best regards,
Krzysztof
Krzysztof Kozlowski (9):
mfd/extcon: max77693: Remove unused extern declarations and
max77693_dev members
mfd: max77693: Store I2C device type as enum
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Sebastian Reichel s...@kernel.org
Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
Acked-by: Chanwoo Choi cw00.c...@samsung.com
Acked-by: Jacek Anaszewski j.anaszew...@samsung.com
---
drivers/extcon
Add support for different configurations of charger's registers so the
same driver could be used on other devices (e.g. MAX77843).
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Mark Brown broo...@kernel.org
---
drivers/regulator/max77693.c | 39
Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon
driver so the max77693-private.h can be included simultaneously with
max77843-private.h.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
Acked-by: Chanwoo Choi cw00.c
Store the device type (obtained from i2c_device_id) as an enum and add a
default type of unknown to distinguish from case when this is not set
at all.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
---
include/linux/mfd/max77693-private.h | 11
Clean up the max77693 private header file by removing:
1. Left-overs from previous way of interrupt handling (driver uses
regmap_irq_chip).
2. Unused members of struct 'max77693_dev' related to interrupts in
extcon driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked
Switch to the same definition of state container as in MAX77693 drivers.
This will allow usage of one regulator driver in both devices: MAX77693
and MAX77843.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com
Acked-by: Lee Jones lee.jo
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Sebastian Reichel s...@kernel.org
Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
Acked-by: Chanwoo Choi cw00.c...@samsung.com
---
drivers/extcon/extcon-max77693.c | 3 ++-
drivers/input/misc
Add support for different configurations of charger's registers so the
same driver could be used on other devices (e.g. MAX77843).
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Mark Brown broo...@kernel.org
---
drivers/regulator/max77693.c | 39
Add MAX77693 prefix to some of the defines used in max77693 extcon
driver so the max77693-private.h can be included simultaneously with
max77843-private.h.
Additionally use BIT() macro in header.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
The max77693 regulator driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/regulator/Kconfig| 8 --
drivers/regulator/Makefile | 1 -
drivers/regulator/max77843.c | 203
picked up by one
maintainer.
Best regards,
Krzysztof
Krzysztof Kozlowski (9):
mfd/extcon: max77693: Remove unused extern declarations and
max77693_dev members
mfd: max77693: Store I2C device type as enum and add default unknown
regulator: max77693: Support different register
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/input/keyboard
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/hid/i2c-hid/i2c
Clean up the max77693 private header file by removing:
1. Left-overs from previous way of interrupt handling (driver uses
regmap_irq_chip).
2. Unused members of struct 'max77693_dev' related to interrupts in
extcon driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Sebastian Reichel s...@kernel.org
Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
Acked-by: Chanwoo Choi cw00.c...@samsung.com
---
drivers/extcon/extcon-max77693.c | 3 ++-
drivers/input/misc
Add support for different configurations of charger's registers so the
same driver could be used on other devices (e.g. MAX77843).
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Mark Brown broo...@kernel.org
---
drivers/regulator/max77693.c | 39
on previous ones.
So probably the easiest way would be picking picked up by one
maintainer.
Best regards,
Krzysztof
Krzysztof Kozlowski (9):
mfd/extcon: max77693: Remove unused extern declarations and
max77693_dev members
mfd: max77693: Store I2C device type as enum and add default unknown
Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon
driver so the max77693-private.h can be included simultaneously with
max77843-private.h.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
Acked-by: Chanwoo Choi cw00.c
The max77693 regulator driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/regulator/Kconfig| 8 --
drivers/regulator/Makefile | 1 -
drivers/regulator/max77843.c | 203
Switch to the same definition of state container as in MAX77693 drivers.
This will allow usage of one regulator driver in both devices: MAX77693
and MAX77843.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Dmitry Torokhov dmitry.torok...@gmail.com
Acked-by: Lee Jones lee.jo
The charger and safeout part of MAX77843 is almost the same as MAX77693.
From regulator point of view the only differences are the constraints
and register values related to these constraints. Now the max77693
regulator driver can be used for MAX77843.
Signed-off-by: Krzysztof Kozlowski
Add MAX77693 prefix to some of the defines used in max77693 extcon
driver so the max77693-private.h can be included simultaneously with
max77843-private.h.
Additionally use BIT() macro in header.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
Store the device type (obtained from i2c_device_id) as an enum and add a
default type of unknown to distinguish from case when this is not set
at all.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
---
include/linux/mfd/max77693-private.h | 11
The max77693 regulator driver supports Maxim 77843 device so remove the
max77843 driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/regulator/Kconfig| 8 --
drivers/regulator/Makefile | 1 -
drivers/regulator/max77843.c | 203
The charger and safeout part of MAX77843 is almost the same as MAX77693.
From regulator point of view the only differences are the constraints
and register values related to these constraints. Now the max77693
regulator driver can be used for MAX77843.
Signed-off-by: Krzysztof Kozlowski
Switch to the same definition of state container as in MAX77693 drivers.
This will allow usage of one regulator driver in both devices: MAX77693
and MAX77843.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/extcon/extcon-max77843.c | 17 +
drivers/input
Add MAX77843_MUIC prefix to some of the defines used in max77843 extcon
driver so the max77693-private.h can be included simultaneously with
max77843-private.h.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Lee Jones lee.jo...@linaro.org
---
drivers/extcon/extcon-max77843
-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Sebastian Reichel s...@kernel.org
---
drivers/extcon/extcon-max77693.c | 3 ++-
drivers/input/misc/max77693-haptic.c | 1 +
drivers/mfd/max77693.c | 31 +
drivers/power/max77693_charger.c | 1
Clean up the max77693 private header file by removing:
1. Left-overs from previous way of interrupt handling (driver uses
regmap_irq_chip).
2. Unused members of struct 'max77693_dev' related to interrupts in
extcon driver.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Store the device type (obtained from i2c_device_id) as an enum and add a
default type of unknown to distinguish from case when this is not set
at all.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
include/linux/mfd/max77693-private.h | 11 ++-
1 file changed, 6
Add support for different configurations of charger's registers so the
same driver could be used on other devices (e.g. MAX77843).
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
Acked-by: Mark Brown broo...@kernel.org
---
drivers/regulator/max77693.c | 39
Add MAX77693 prefix to some of the defines used in max77693 extcon
driver so the max77693-private.h can be included simultaneously with
max77843-private.h.
Additionally use BIT() macro in header.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/extcon/extcon-max77693.c
Switch to the same definition of state container as in MAX77693 drivers.
This will allow usage of one regulator driver in both devices: MAX77693
and MAX77843.
Signed-off-by: Krzysztof Kozlowski k.kozlowsk...@gmail.com
---
drivers/extcon/extcon-max77843.c | 17 +
drivers/input
2015-03-25 1:39 GMT+01:00 Beomho Seo beomho@samsung.com:
Then, Can I request merge this patch ?
Yes, but it is not up to me :).
--
To unsubscribe from this list: send the line unsubscribe linux-input in
the body of a message to majord...@vger.kernel.org
More majordomo info at
2015-03-24 9:01 GMT+01:00 Beomho Seo beomho@samsung.com:
On 03/10/2015 10:44 PM, Beomho Seo wrote:
On 03/09/2015 09:13 PM, Krzysztof Kozlowski wrote:
On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote:
On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote:
2015-03-09 1:35 GMT+01:00 Beomho
2015-03-24 9:02 GMT+01:00 Beomho Seo beomho@samsung.com:
On 03/10/2015 10:44 PM, Beomho Seo wrote:
On 03/09/2015 07:01 PM, Krzysztof Kozlowski wrote:
2015-03-09 1:36 GMT+01:00 Beomho Seo beomho@samsung.com:
On 03/08/2015 05:14 AM, Sebastian Reichel wrote:
Hi,
On Mon, Mar 02, 2015
On pon, 2015-03-23 at 17:54 +0300, Dan Carpenter wrote:
Hello Krzysztof Kozlowski,
The patch 297d716f6260: power_supply: Change ownership from driver
to core from Mar 12, 2015, leads to the following static checker
warning:
drivers/hid/hid-input.c:457 hidinput_setup_battery
Do not call power_supply_powers() if power_supply_register() failed
earlier. This fixes possible NULL pointer dereference by
power_supply_powers() in such case.
Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com
Reported-by: Dan Carpenter dan.carpen...@oracle.com
---
The patch
On czw, 2015-03-12 at 08:43 +0100, Krzysztof Kozlowski wrote:
Hi,
Resending patchset because it was filtered out by vger.kernel.org.
The patchset fixes invalid memory accesses in certain race scenarios by
moving ownership of struct power_supply to the core. All drivers are
modified.
Hi
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
- 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
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
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
, 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
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
On śro, 2015-03-11 at 19:46 +0100, Sebastian Reichel wrote:
Hi Jiri,
On Wed, Mar 11, 2015 at 12:08:09PM -0400, Jiri Kosina wrote:
On Tue, 10 Mar 2015, Sebastian Reichel wrote:
On Tue, Mar 10, 2015 at 09:27:17AM +0100, Krzysztof Kozlowski wrote:
Change the ownership of power_supply
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
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
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
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
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
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
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
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
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
On czw, 2015-03-12 at 09:01 +, Lee Jones wrote:
On Thu, 12 Mar 2015, Krzysztof Kozlowski wrote:
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
On czw, 2015-03-12 at 09:50 +, Lee Jones wrote:
On Thu, 12 Mar 2015, Krzysztof Kozlowski wrote:
On czw, 2015-03-12 at 09:01 +, Lee Jones wrote:
On Thu, 12 Mar 2015, Krzysztof Kozlowski wrote:
Replace direct calls to power supply function attributes with wrappers.
Wrappers
On wto, 2015-03-10 at 09:27 +0100, Krzysztof Kozlowski wrote:
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
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
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
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
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
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
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
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
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
- 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
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
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
/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
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
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
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
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
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
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
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
On pon, 2015-03-09 at 20:46 +0900, Beomho Seo wrote:
On 03/09/2015 08:02 PM, Krzysztof Kozlowski wrote:
2015-03-09 1:35 GMT+01:00 Beomho Seo beomho@samsung.com:
On 03/08/2015 05:13 AM, Sebastian Reichel wrote:
On Mon, Mar 02, 2015 at 07:10:35PM +0900, Jaewon Kim wrote:
From: Beomho
1 - 100 of 163 matches
Mail list logo