Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9838aa60 authored by Harry Yang's avatar Harry Yang
Browse files

power: smb138x: disable try_sink SW workaround



Add module property try_sink_enabled and disable it by default.

More importantly, this fixes a bug of uninitialized pointer access.

Change-Id: I2d83d72492422676bc0fe9449d32be9cab29e468
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent 40fd3aef
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -111,6 +111,11 @@ module_param_named(
	debug_mask, __debug_mask, int, 0600
);

static int __try_sink_enabled;
module_param_named(
	try_sink_enabled, __try_sink_enabled, int, 0600
);

static irqreturn_t smb138x_handle_slave_chg_state_change(int irq, void *data)
{
	struct smb_irq_data *irq_data = data;
@@ -1766,6 +1771,7 @@ static int smb138x_probe(struct platform_device *pdev)

	chip->chg.dev = &pdev->dev;
	chip->chg.debug_mask = &__debug_mask;
	chip->chg.try_sink_enabled = &__try_sink_enabled;
	chip->chg.irq_info = smb138x_irqs;
	chip->chg.name = "SMB";