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>] [day] [month] [year] [list]
Message-Id: <1432736650-25280-1-git-send-email-cw00.choi@samsung.com>
Date:	Wed, 27 May 2015 23:24:10 +0900
From:	Chanwoo Choi <cwchoi00@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	cw00.choi@...sung.com, myungjoo.ham@...sung.com
Subject: [PATCH] extcon: Remove optional print_name() function pointer of extcon_dev

This patch removes the optional print_name() function pointer included in
'struct extcon_dev' because the extcon must maintain the consistent name of
extcon device on sysfs instead of inconsistent name. After merged patch[1],
extcon can maintain the consistent name of extcon device without any hard-coded
device name.
[1] https://lkml.org/lkml/2015/4/27/258

Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
---
 drivers/extcon/extcon.c | 8 --------
 include/linux/extcon.h  | 3 ---
 2 files changed, 11 deletions(-)

diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index 142bf0f..0bde09e 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -207,14 +207,6 @@ static ssize_t name_show(struct device *dev, struct device_attribute *attr,
 {
 	struct extcon_dev *edev = dev_get_drvdata(dev);
 
-	/* Optional callback given by the user */
-	if (edev->print_name) {
-		int ret = edev->print_name(edev, buf);
-
-		if (ret >= 0)
-			return ret;
-	}
-
 	return sprintf(buf, "%s\n", edev->name);
 }
 static DEVICE_ATTR_RO(name);
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 79e5073..e4b68e9 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -96,8 +96,6 @@ struct extcon_cable;
  *			be attached simulataneously. {0x7, 0} is equivalent to
  *			{0x3, 0x6, 0x5, 0}. If it is {0xFFFFFFFF, 0}, there
  *			can be no simultaneous connections.
- * @print_name:		An optional callback to override the method to print the
- *			name of the extcon device.
  * @print_state:	An optional callback to override the method to print the
  *			status of the extcon device.
  * @dev:		Device of this extcon.
@@ -126,7 +124,6 @@ struct extcon_dev {
 	const u32 *mutually_exclusive;
 
 	/* Optional callbacks to override class functions */
-	ssize_t	(*print_name)(struct extcon_dev *edev, char *buf);
 	ssize_t	(*print_state)(struct extcon_dev *edev, char *buf);
 
 	/* Internal data. Please do not set. */
-- 
2.2.0.GIT

--
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