lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <79898642236850cd9d69d908a66ddcd778548eaf.1446463654.git.hns@goldelico.com>
Date:	Mon,  2 Nov 2015 12:27:36 +0100
From:	"H. Nikolaus Schaller" <hns@...delico.com>
To:	GraÅžvydas Ignotas <notasas@...il.com>,
	Sebastian Reichel <sre@...nel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Andreas Kemnade <andreas@...nade.info>
Cc:	linux-pm@...r.kernel.org, gta04-owner@...delico.com,
	linux-kernel@...r.kernel.org,
	"H. Nikolaus Schaller" <hns@...delico.com>
Subject: [PATCH v2 3/3] drivers:power:twl4030-charger: don't check if battery is present

We can't assume that the battery is present after probing (it can
sometimes be removed/hot swapped by the user while device
(e.g. GTA04 or OpenPanodra) is operated through external AC
or USB power).

So it makes no sense to check for this situation (only) during probe.

Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>
---
 drivers/power/twl4030_charger.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 05d693d..6fbdf24 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -1006,13 +1006,6 @@ static int twl4030_bci_probe(struct platform_device *pdev)
 	bci->irq_chg = platform_get_irq(pdev, 0);
 	bci->irq_bci = platform_get_irq(pdev, 1);
 
-	/* Only proceed further *IF* battery is physically present */
-	ret = twl4030_is_battery_present(bci);
-	if  (ret) {
-		dev_crit(&pdev->dev, "Battery was not detected:%d\n", ret);
-		return ret;
-	}
-
 	platform_set_drvdata(pdev, bci);
 
 	bci->ac = devm_power_supply_register(&pdev->dev, &twl4030_bci_ac_desc,
-- 
2.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ