From: Christos Gkekas <chris.gekas@gmail.com>
To: Darren Hart <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Christos Gkekas <chris.gekas@gmail.com>
Subject: [PATCH] intel-oaktrail: Clean up dead code
Date: Sun, 8 Oct 2017 23:57:49 +0100 [thread overview]
Message-ID: <1507503469-22507-1-git-send-email-chris.gekas@gmail.com> (raw)
A couple of macros are unused and need to be removed.
Also variable percent is unsigned so checking whether it is less than
zero is redundant.
Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
drivers/platform/x86/intel_oaktrail.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
index 5747f63..0614d2b 100644
--- a/drivers/platform/x86/intel_oaktrail.c
+++ b/drivers/platform/x86/intel_oaktrail.c
@@ -68,12 +68,10 @@
*/
#define OT_EC_DEVICE_STATE_ADDRESS 0xD6
-#define OT_EC_CAMERA_MASK (1 << 0)
#define OT_EC_BT_MASK (1 << 1)
#define OT_EC_GPS_MASK (1 << 2)
#define OT_EC_WIFI_MASK (1 << 3)
#define OT_EC_WWAN_MASK (1 << 4)
-#define OT_EC_TS_MASK (1 << 5)
/*
* This is the address in EC space and commands used to control LCD backlight:
@@ -228,7 +226,7 @@ static int get_backlight_brightness(struct backlight_device *b)
static int set_backlight_brightness(struct backlight_device *b)
{
u8 percent = (u8) b->props.brightness;
- if (percent < 0 || percent > OT_EC_BL_BRIGHTNESS_MAX)
+ if (percent > OT_EC_BL_BRIGHTNESS_MAX)
return -EINVAL;
ec_write(OT_EC_BL_BRIGHTNESS_ADDRESS, percent);
--
2.7.4
next reply other threads:[~2017-10-08 22:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-08 22:57 Christos Gkekas [this message]
2017-10-09 10:21 ` [PATCH] intel-oaktrail: Clean up dead code Andy Shevchenko
2017-10-09 20:45 ` Christos Gkekas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1507503469-22507-1-git-send-email-chris.gekas@gmail.com \
--to=chris.gekas@gmail.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.