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: <1479751491-8849-2-git-send-email-nicolas.saenz@prodys.net>
Date:   Mon, 21 Nov 2016 19:04:50 +0100
From:   Nicola Saenz Julienne <nicolas.saenz@...dys.net>
To:     sre@...nel.org
Cc:     linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
        nicolas.saenz@...dys.net
Subject: [PATCH 1/2] power: supply: sbs-battery: use fixed device name

The current device name for sbs-battery is derived from it's i2c address.
This is not acceptable if we want to be able to trigger the
"external_power_changed()" routine from a charger driver.

Signed-off-by: Nicola Saenz Julienne <nicolas.saenz@...dys.net>
---
 drivers/power/supply/sbs-battery.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
index 8bb2eb3..9565c696 100644
--- a/drivers/power/supply/sbs-battery.c
+++ b/drivers/power/supply/sbs-battery.c
@@ -740,6 +740,7 @@ static void sbs_delayed_work(struct work_struct *work)
 }
 
 static const struct power_supply_desc sbs_default_desc = {
+	.name = "sbs-battery",
 	.type = POWER_SUPPLY_TYPE_BATTERY,
 	.properties = sbs_properties,
 	.num_properties = ARRAY_SIZE(sbs_properties),
@@ -762,11 +763,6 @@ static int sbs_probe(struct i2c_client *client,
 	if (!sbs_desc)
 		return -ENOMEM;
 
-	sbs_desc->name = devm_kasprintf(&client->dev, GFP_KERNEL, "sbs-%s",
-			dev_name(&client->dev));
-	if (!sbs_desc->name)
-		return -ENOMEM;
-
 	chip = devm_kzalloc(&client->dev, sizeof(struct sbs_info), GFP_KERNEL);
 	if (!chip)
 		return -ENOMEM;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ