From patchwork Mon Jan 21 12:03:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 14154 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3CC0323E33 for ; Mon, 21 Jan 2013 12:04:59 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by fiordland.canonical.com (Postfix) with ESMTP id EC8EFA18DD5 for ; Mon, 21 Jan 2013 12:04:58 +0000 (UTC) Received: by mail-vc0-f181.google.com with SMTP id d16so3257171vcd.26 for ; Mon, 21 Jan 2013 04:04:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=hV+K1Nb1sW2TGlvGSWN17T23SUX3T5fVvrdNXQTxWDE=; b=EozP1fU0dwUbBvDu0n/P09EzZr7GwhwJWlxI+03Bw/xwVghgAmyd91XRdWJ6AzOjjJ QZ6XEFhvWd9Hmr0iMRb844DAwdOgFRAOJikmDxCPYN8KUedm5BxDDg/o+YOi9M8aZS2O NeahGPVGAab1T8hi9XCF/tnc9xNo5lsTwV95WwoEfGscQuO4x6NqiuQPVxW/FKHqqnom 3TIISy8L7tNG98yzX/Hq42w4DJ8QlfzwjC+k31Xae0nSxgd32giQ1FaETFtSaHPOrKwW AkNWtGa4oRYcR5GMtHo9Uwrg4ZV66UFBdCjqgfFhfZVRSarpXjy27Fja6KyxWVLWLkTp d+ig== X-Received: by 10.52.16.6 with SMTP id b6mr13854813vdd.40.1358769898459; Mon, 21 Jan 2013 04:04:58 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp197725veb; Mon, 21 Jan 2013 04:04:56 -0800 (PST) X-Received: by 10.180.86.39 with SMTP id m7mr14905975wiz.1.1358769883934; Mon, 21 Jan 2013 04:04:43 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by mx.google.com with ESMTPS id yn8si4803599wjc.39.2013.01.21.04.04.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:04:43 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.173 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.173; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.173 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f173.google.com with SMTP id hn17so7063158wib.12 for ; Mon, 21 Jan 2013 04:04:43 -0800 (PST) X-Received: by 10.181.13.75 with SMTP id ew11mr15109796wid.9.1358769875956; Mon, 21 Jan 2013 04:04:35 -0800 (PST) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id i2sm16575305wiw.3.2013.01.21.04.04.34 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jan 2013 04:04:35 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, anton.vorontsov@linaro.org, cbou@mail.ru, Lee Jones Subject: [PATCH 10/24] ab8500-chargalg: Only root should have write permission on sysfs file Date: Mon, 21 Jan 2013 12:03:46 +0000 Message-Id: <1358769840-4763-11-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1358769840-4763-1-git-send-email-lee.jones@linaro.org> References: <1358769840-4763-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQmSAOAL7j1/dxKPKSUfJznDSXiJTTIjgvgzhSjDuBWPAqD9KQfbmhhsyVruMODSqoe5QCB/ Only root should have write permission on sysfs file ab8500_chargalg/chargalg. Signed-off-by: Lee Jones --- drivers/power/abx500_chargalg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 2463fa0..f59bc02 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -1711,7 +1711,7 @@ static ssize_t abx500_chargalg_sysfs_charger(struct kobject *kobj, static struct attribute abx500_chargalg_en_charger = \ { .name = "chargalg", - .mode = S_IWUGO, + .mode = S_IWUSR, }; static struct attribute *abx500_chargalg_chg[] = {