From: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Len Brown <lenb@kernel.org>, Richard Purdie <rpurdie@rpsys.net>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
linux-acpi@vger.kernel.org
Subject: [PATCH -mm 1/1] misc,acpi,backlight: Compal Laptop Extras - remove unnecessary attribute
Date: Thu, 12 Jun 2008 22:08:59 +0200 [thread overview]
Message-ID: <20080612220859.2540a64a@debian> (raw)
From: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
Compal-laptop: remove unnecessary attribute (lcd_level)
Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>
---
diff -Nuar a/drivers/misc/compal-laptop.c b/drivers/misc/compal-laptop.c
--- a/drivers/misc/compal-laptop.c 2008-06-12 21:49:45.000000000 +0200
+++ b/drivers/misc/compal-laptop.c 2008-06-12 21:55:46.000000000 +0200
@@ -28,9 +28,6 @@
*
* This driver exports a few files in /sys/devices/platform/compal-laptop/:
*
- * lcd_level - Screen brightness: contains a single integer in the
- * range 0..7. (rw)
- *
* wlan - wlan subsystem state: contains 0 or 1 (rw)
*
* bluetooth - Bluetooth subsystem state: contains 0 or 1 (rw)
@@ -44,7 +41,7 @@
* This driver might work on other laptops produced by Compal. If you
* want to try it you can pass force=1 as argument to the module which
* will force it to load even when the DMI data doesn't identify the
- * laptop as IFL90.
+ * laptop as FL9x.
*/
#include <linux/module.h>
@@ -56,7 +53,7 @@
#include <linux/platform_device.h>
#include <linux/autoconf.h>
-#define COMPAL_DRIVER_VERSION "0.2.5"
+#define COMPAL_DRIVER_VERSION "0.2.6"
#define COMPAL_LCD_LEVEL_MAX 8
@@ -209,34 +206,6 @@
return sprintf(buf, "%i\n", enabled);
}
-static ssize_t show_lcd_level(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- int ret;
-
- ret = get_lcd_level();
- if (ret < 0)
- return ret;
-
- return sprintf(buf, "%i\n", ret);
-}
-
-static ssize_t store_lcd_level(struct device *dev,
- struct device_attribute *attr, const char *buf, size_t count)
-{
- int level, ret;
-
- if (sscanf(buf, "%i", &level) != 1 ||
- (level < 0 || level >= COMPAL_LCD_LEVEL_MAX))
- return -EINVAL;
-
- ret = set_lcd_level(level);
- if (ret < 0)
- return ret;
-
- return count;
-}
-
static ssize_t store_wlan_state(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
@@ -267,13 +236,11 @@
return count;
}
-static DEVICE_ATTR(lcd_level, 0644, show_lcd_level, store_lcd_level);
static DEVICE_ATTR(bluetooth, 0644, show_bluetooth, store_bluetooth_state);
static DEVICE_ATTR(wlan, 0644, show_wlan, store_wlan_state);
static DEVICE_ATTR(raw, 0444, show_raw, NULL);
static struct attribute *compal_attributes[] = {
- &dev_attr_lcd_level.attr,
&dev_attr_bluetooth.attr,
&dev_attr_wlan.attr,
&dev_attr_raw.attr,
reply other threads:[~2008-06-12 20:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080612220859.2540a64a@debian \
--to=cezary.jackiewicz@gmail.com \
--cc=akpm@osdl.org \
--cc=hmh@hmh.eng.br \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox