All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corentin Chary <corentincj@iksaif.net>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, acpi4asus-user@lists.sourceforge.net,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Corentin Chary <corentincj@iksaif.net>
Subject: [PATCH 28/28] asus-laptop: fix style problems reported by checkpath.pl
Date: Tue,  2 Feb 2010 08:39:11 +0100	[thread overview]
Message-ID: <1265096351-15239-29-git-send-email-corentincj@iksaif.net> (raw)
In-Reply-To: <1265096351-15239-28-git-send-email-corentincj@iksaif.net>

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
 drivers/platform/x86/asus-laptop.c |   94 ++++++++++++++++++------------------
 1 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index d0d117b..791fcf3 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -45,12 +45,12 @@
 #include <linux/fb.h>
 #include <linux/leds.h>
 #include <linux/platform_device.h>
-#include <acpi/acpi_drivers.h>
-#include <acpi/acpi_bus.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <linux/input.h>
 #include <linux/input/sparse-keymap.h>
 #include <linux/rfkill.h>
+#include <acpi/acpi_drivers.h>
+#include <acpi/acpi_bus.h>
 
 #define ASUS_LAPTOP_VERSION	"0.42"
 
@@ -94,10 +94,10 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
 /*
  * Some events we use, same for all Asus
  */
-#define ATKD_BR_UP	0x10	// (event & ~ATKD_BR_UP) = brightness level
-#define ATKD_BR_DOWN	0x20	// (event & ~ATKD_BR_DOWN) = britghness level
+#define ATKD_BR_UP	0x10	/* (event & ~ATKD_BR_UP) = brightness level */
+#define ATKD_BR_DOWN	0x20	/* (event & ~ATKD_BR_DOWN) = britghness level */
 #define ATKD_BR_MIN	ATKD_BR_UP
-#define ATKD_BR_MAX	(ATKD_BR_DOWN | 0xF)	// 0x2f
+#define ATKD_BR_MAX	(ATKD_BR_DOWN | 0xF)	/* 0x2f */
 #define ATKD_LCD_ON	0x33
 #define ATKD_LCD_OFF	0x34
 
@@ -114,10 +114,6 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
 #define WL_RSTS		0x01	/* internal Wifi */
 #define BT_RSTS		0x02	/* internal Bluetooth */
 
-#define ASUS_HANDLE(object, paths...)					\
-	static acpi_handle  object##_handle = NULL;			\
-	static char *object##_paths[] = { paths }
-
 /* LED */
 #define METHOD_MLED		"MLED"
 #define METHOD_TLED		"TLED"
@@ -142,40 +138,44 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
 #define METHOD_BRIGHTNESS_GET	"GPLV"
 
 /* Backlight */
-ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG.EC0._Q10",	/* All new models */
-	    "\\_SB.PCI0.ISA.EC0._Q10",	/* A1x */
-	    "\\_SB.PCI0.PX40.ECD0._Q10",	/* L3C */
-	    "\\_SB.PCI0.PX40.EC0.Q10",	/* M1A */
-	    "\\_SB.PCI0.LPCB.EC0._Q10",	/* P30 */
-	    "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */
-	    "\\_SB.PCI0.PX40.Q10",	/* S1x */
-	    "\\Q10");		/* A2x, L2D, L3D, M2E */
+static acpi_handle lcd_switch_handle;
+static const char *lcd_switch_paths[] = {
+  "\\_SB.PCI0.SBRG.EC0._Q10",	/* All new models */
+  "\\_SB.PCI0.ISA.EC0._Q10",	/* A1x */
+  "\\_SB.PCI0.PX40.ECD0._Q10",	/* L3C */
+  "\\_SB.PCI0.PX40.EC0.Q10",	/* M1A */
+  "\\_SB.PCI0.LPCB.EC0._Q10",	/* P30 */
+  "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */
+  "\\_SB.PCI0.PX40.Q10",	/* S1x */
+  "\\Q10"};		/* A2x, L2D, L3D, M2E */
 
 /* Display */
 #define METHOD_SWITCH_DISPLAY	"SDSP"
-ASUS_HANDLE(display_get,
-	    /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */
-	    "\\_SB.PCI0.P0P1.VGA.GETD",
-	    /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */
-	    "\\_SB.PCI0.P0P2.VGA.GETD",
-	    /* A6V A6Q */
-	    "\\_SB.PCI0.P0P3.VGA.GETD",
-	    /* A6T, A6M */
-	    "\\_SB.PCI0.P0PA.VGA.GETD",
-	    /* L3C */
-	    "\\_SB.PCI0.PCI1.VGAC.NMAP",
-	    /* Z96F */
-	    "\\_SB.PCI0.VGA.GETD",
-	    /* A2D */
-	    "\\ACTD",
-	    /* A4G Z71A W1N W5A W5F M2N M3N M5N M6N S1N S5N */
-	    "\\ADVG",
-	    /* P30 */
-	    "\\DNXT",
-	    /* A2H D1 L2D L3D L3H L2E L5D L5C M1A M2E L4L W3V */
-	    "\\INFB",
-	    /* A3F A6F A3N A3L M6N W3N W6A */
-	    "\\SSTE");
+
+static acpi_handle display_get_handle;
+static const char *display_get_paths[] = {
+  /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */
+  "\\_SB.PCI0.P0P1.VGA.GETD",
+  /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */
+  "\\_SB.PCI0.P0P2.VGA.GETD",
+  /* A6V A6Q */
+  "\\_SB.PCI0.P0P3.VGA.GETD",
+  /* A6T, A6M */
+  "\\_SB.PCI0.P0PA.VGA.GETD",
+  /* L3C */
+  "\\_SB.PCI0.PCI1.VGAC.NMAP",
+  /* Z96F */
+  "\\_SB.PCI0.VGA.GETD",
+  /* A2D */
+  "\\ACTD",
+  /* A4G Z71A W1N W5A W5F M2N M3N M5N M6N S1N S5N */
+  "\\ADVG",
+  /* P30 */
+  "\\DNXT",
+  /* A2H D1 L2D L3D L3H L2E L5D L5C M1A M2E L4L W3V */
+  "\\INFB",
+  /* A3F A6F A3N A3L M6N W3N W6A */
+  "\\SSTE"};
 
 #define METHOD_ALS_CONTROL	"ALSC" /* Z71A Z71V */
 #define METHOD_ALS_LEVEL	"ALSL" /* Z71A Z71V */
@@ -426,7 +426,7 @@ static void asus_kled_cdev_set(struct led_classdev *led_cdev,
 	struct asus_led *led = container_of(led_cdev, struct asus_led, led);
 	struct asus_laptop *asus = led->asus;
 
-        led->wk = value;
+	led->wk = value;
 	queue_work(asus->led_workqueue, &led->work);
 }
 
@@ -474,7 +474,7 @@ static int asus_led_register(struct asus_laptop *asus,
 	struct led_classdev *led_cdev = &led->led;
 
 	if (!method || acpi_check_handle(asus->handle, method, NULL))
-	    return 0; /* Led not present */
+		return 0; /* Led not present */
 
 	led->asus = asus;
 	led->method = method;
@@ -687,8 +687,8 @@ static ssize_t show_infos(struct device *dev,
 	acpi_status rv = AE_OK;
 
 	/*
-	 * We use the easy way, we don't care of off and count, so we don't set eof
-	 * to 1
+	 * We use the easy way, we don't care of off and count,
+	 * so we don't set eof to 1
 	 */
 
 	len += sprintf(page, ASUS_LAPTOP_NAME " " ASUS_LAPTOP_VERSION "\n");
@@ -904,7 +904,7 @@ static int read_display(struct asus_laptop *asus)
 			pr_warning("Error reading display status\n");
 	}
 
-	value &= 0x0F;		/* needed for some models, shouldn't hurt others */
+	value &= 0x0F; /* needed for some models, shouldn't hurt others */
 
 	return value;
 }
@@ -1041,7 +1041,7 @@ static ssize_t show_gps(struct device *dev,
 static ssize_t store_gps(struct device *dev, struct device_attribute *attr,
 			 const char *buf, size_t count)
 {
- 	struct asus_laptop *asus = dev_get_drvdata(dev);
+	struct asus_laptop *asus = dev_get_drvdata(dev);
 	int rv, value;
 	int ret;
 
-- 
1.6.6.1


      reply	other threads:[~2010-02-02  7:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-02  7:38 [PATCH 00/28] acpi4asus: asus-laptop rewrite for 2.6.33 Corentin Chary
2010-02-02  7:38 ` [PATCH 01/28] asus-laptop: add wireless and bluetooth status parameter Corentin Chary
2010-02-02  7:38   ` [PATCH 02/28] asus-laptop: set the right paths in the documentation Corentin Chary
2010-02-02  7:38     ` [PATCH 03/28] asus-laptop: no need to check argument of set_brightness() Corentin Chary
2010-02-02  7:38       ` [PATCH 04/28] asus-laptop: simplify write_acpi_int Corentin Chary
2010-02-02  7:38         ` [PATCH 05/28] asus-laptop: use tabs to indent macros and remove unused ones Corentin Chary
2010-02-02  7:38           ` [PATCH 06/28] asus-laptop: remove unecessary hotk != NULL check Corentin Chary
2010-02-02  7:38             ` [PATCH 07/28] asus-laptop: change initialization order Corentin Chary
2010-02-02  7:38               ` [PATCH 08/28] asus-laptop: revise names Corentin Chary
2010-02-02  7:38                 ` [PATCH 09/28] asus-laptop: move backlight and dsdt info inside asus_laptop struct Corentin Chary
2010-02-02  7:38                   ` [PATCH 10/28] asus-laptop: callbacks should use "driver data" parameter or field Corentin Chary
2010-02-02  7:38                     ` [PATCH 11/28] asus-laptop: code movement Corentin Chary
2010-02-02  7:38                       ` [PATCH 12/28] asus-laptop: stop using read_status for bluetooth and wlan Corentin Chary
2010-02-02  7:38                         ` [PATCH 13/28] asus-laptop: stop using read_status and store_status for GPS Corentin Chary
2010-02-02  7:38                           ` [PATCH 14/28] asus-laptop: stop using read_status for lcd Corentin Chary
2010-02-02  7:38                             ` [PATCH 15/28] asus-laptop: removing read_status/store_status/write_status and asus->status Corentin Chary
2010-02-02  7:38                               ` [PATCH 16/28] asus-laptop: rename function talking directly to acpi with asus_xxx scheme Corentin Chary
2010-02-02  7:39                                 ` [PATCH 17/28] asus-laptop: stop using ASUS_HANDLE and use relative methods instead Corentin Chary
2010-02-02  7:39                                   ` [PATCH 18/28] asus-laptop: add error check for write_acpi_int calls Corentin Chary
2010-02-02  7:39                                     ` [PATCH 19/28] asus-laptop: rename wireless_status to wlan_status to avoid confusion Corentin Chary
2010-02-02  7:39                                       ` [PATCH 20/28] asus-laptop: switch to sparse keymap library Corentin Chary
2010-02-02  7:39                                         ` [PATCH 21/28] asus-laptop: add bluetooth keys found on M9V Corentin Chary
2010-02-02  7:39                                           ` [PATCH 22/28] asus-laptop: add backlight changes notifications Corentin Chary
2010-02-02  7:39                                             ` [PATCH 23/28] asus-laptop: leds, remove dead code and fix asus_led_exit()/asus_led_init() Corentin Chary
2010-02-02  7:39                                               ` [PATCH 24/28] asus-laptop: set initial lcd state Corentin Chary
2010-02-02  7:39                                                 ` [PATCH 25/28] asus-laptop: add gps rfkill Corentin Chary
2010-02-02  7:39                                                   ` [PATCH 26/28] asus-laptop: clean led code Corentin Chary
2010-02-02  7:39                                                     ` [PATCH 27/28] asus-laptop: use device_create_file() instead of platform_group Corentin Chary
2010-02-02  7:39                                                       ` Corentin Chary [this message]

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=1265096351-15239-29-git-send-email-corentincj@iksaif.net \
    --to=corentincj@iksaif.net \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@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.