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: <1307006687-12736-1-git-send-email-ike.pan@canonical.com>
Date:	Thu,  2 Jun 2011 17:24:47 +0800
From:	Ike Panhc <ike.pan@...onical.com>
To:	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Matthew Garrett <mjg@...hat.com>
Subject: [PATCH 3/3] ideapad: Show negative when no camera

Signed-off-by: Ike Panhc <ike.pan@...onical.com>
---
 drivers/platform/x86/ideapad-laptop.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 9c09891..4a54ed1 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -38,6 +38,7 @@
 #define CFG_BT_BIT	(16)
 #define CFG_3G_BIT	(17)
 #define CFG_WIFI_BIT	(18)
+#define CFG_CAMERA_BIT	(19)
 
 struct ideapad_private {
 	struct rfkill *rfk[IDEAPAD_RFKILL_DEV_NUM];
@@ -199,6 +200,10 @@ static ssize_t show_ideapad_cam(struct device *dev,
 				struct device_attribute *attr,
 				char *buf)
 {
+	struct ideapad_private *priv = dev_get_drvdata(dev);
+
+	if (!test_bit(CFG_CAMERA_BIT, &(priv->cfg)))
+		return sprintf(buf, "-1\n");
 	return show_ideapad_helper(dev, attr, buf, 0x1D);
 }
 
-- 
1.7.4.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