aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2010-01-28 04:52:40 -0500
committerCorentin Chary <corentincj@iksaif.net>2010-02-28 13:35:13 -0500
commit060cbce6c4431465e83907102e1903ecea366db5 (patch)
tree4cf36d23cc69d58651246c62337146c1ce41dabd /drivers/platform
parent2a1fd64cb70a42563d2313eb70c6495d2c88b36d (diff)
asus-laptop: fix style problems reported by checkpath.pl
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-laptop.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index d0d117b0cf79..791fcf321506 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -45,12 +45,12 @@
45#include <linux/fb.h> 45#include <linux/fb.h>
46#include <linux/leds.h> 46#include <linux/leds.h>
47#include <linux/platform_device.h> 47#include <linux/platform_device.h>
48#include <acpi/acpi_drivers.h> 48#include <linux/uaccess.h>
49#include <acpi/acpi_bus.h>
50#include <asm/uaccess.h>
51#include <linux/input.h> 49#include <linux/input.h>
52#include <linux/input/sparse-keymap.h> 50#include <linux/input/sparse-keymap.h>
53#include <linux/rfkill.h> 51#include <linux/rfkill.h>
52#include <acpi/acpi_drivers.h>
53#include <acpi/acpi_bus.h>
54 54
55#define ASUS_LAPTOP_VERSION "0.42" 55#define ASUS_LAPTOP_VERSION "0.42"
56 56
@@ -94,10 +94,10 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
94/* 94/*
95 * Some events we use, same for all Asus 95 * Some events we use, same for all Asus
96 */ 96 */
97#define ATKD_BR_UP 0x10 // (event & ~ATKD_BR_UP) = brightness level 97#define ATKD_BR_UP 0x10 /* (event & ~ATKD_BR_UP) = brightness level */
98#define ATKD_BR_DOWN 0x20 // (event & ~ATKD_BR_DOWN) = britghness level 98#define ATKD_BR_DOWN 0x20 /* (event & ~ATKD_BR_DOWN) = britghness level */
99#define ATKD_BR_MIN ATKD_BR_UP 99#define ATKD_BR_MIN ATKD_BR_UP
100#define ATKD_BR_MAX (ATKD_BR_DOWN | 0xF) // 0x2f 100#define ATKD_BR_MAX (ATKD_BR_DOWN | 0xF) /* 0x2f */
101#define ATKD_LCD_ON 0x33 101#define ATKD_LCD_ON 0x33
102#define ATKD_LCD_OFF 0x34 102#define ATKD_LCD_OFF 0x34
103 103
@@ -114,10 +114,6 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
114#define WL_RSTS 0x01 /* internal Wifi */ 114#define WL_RSTS 0x01 /* internal Wifi */
115#define BT_RSTS 0x02 /* internal Bluetooth */ 115#define BT_RSTS 0x02 /* internal Bluetooth */
116 116
117#define ASUS_HANDLE(object, paths...) \
118 static acpi_handle object##_handle = NULL; \
119 static char *object##_paths[] = { paths }
120
121/* LED */ 117/* LED */
122#define METHOD_MLED "MLED" 118#define METHOD_MLED "MLED"
123#define METHOD_TLED "TLED" 119#define METHOD_TLED "TLED"
@@ -142,40 +138,44 @@ MODULE_PARM_DESC(bluetooth_status, "Set the wireless status on boot "
142#define METHOD_BRIGHTNESS_GET "GPLV" 138#define METHOD_BRIGHTNESS_GET "GPLV"
143 139
144/* Backlight */ 140/* Backlight */
145ASUS_HANDLE(lcd_switch, "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */ 141static acpi_handle lcd_switch_handle;
146 "\\_SB.PCI0.ISA.EC0._Q10", /* A1x */ 142static const char *lcd_switch_paths[] = {
147 "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */ 143 "\\_SB.PCI0.SBRG.EC0._Q10", /* All new models */
148 "\\_SB.PCI0.PX40.EC0.Q10", /* M1A */ 144 "\\_SB.PCI0.ISA.EC0._Q10", /* A1x */
149 "\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */ 145 "\\_SB.PCI0.PX40.ECD0._Q10", /* L3C */
150 "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */ 146 "\\_SB.PCI0.PX40.EC0.Q10", /* M1A */
151 "\\_SB.PCI0.PX40.Q10", /* S1x */ 147 "\\_SB.PCI0.LPCB.EC0._Q10", /* P30 */
152 "\\Q10"); /* A2x, L2D, L3D, M2E */ 148 "\\_SB.PCI0.LPCB.EC0._Q0E", /* P30/P35 */
149 "\\_SB.PCI0.PX40.Q10", /* S1x */
150 "\\Q10"}; /* A2x, L2D, L3D, M2E */
153 151
154/* Display */ 152/* Display */
155#define METHOD_SWITCH_DISPLAY "SDSP" 153#define METHOD_SWITCH_DISPLAY "SDSP"
156ASUS_HANDLE(display_get, 154
157 /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */ 155static acpi_handle display_get_handle;
158 "\\_SB.PCI0.P0P1.VGA.GETD", 156static const char *display_get_paths[] = {
159 /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */ 157 /* A6B, A6K A6R A7D F3JM L4R M6R A3G M6A M6V VX-1 V6J V6V W3Z */
160 "\\_SB.PCI0.P0P2.VGA.GETD", 158 "\\_SB.PCI0.P0P1.VGA.GETD",
161 /* A6V A6Q */ 159 /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V S5A M5A z33A W1Jc W2V G1 */
162 "\\_SB.PCI0.P0P3.VGA.GETD", 160 "\\_SB.PCI0.P0P2.VGA.GETD",
163 /* A6T, A6M */ 161 /* A6V A6Q */
164 "\\_SB.PCI0.P0PA.VGA.GETD", 162 "\\_SB.PCI0.P0P3.VGA.GETD",
165 /* L3C */ 163 /* A6T, A6M */
166 "\\_SB.PCI0.PCI1.VGAC.NMAP", 164 "\\_SB.PCI0.P0PA.VGA.GETD",
167 /* Z96F */ 165 /* L3C */
168 "\\_SB.PCI0.VGA.GETD", 166 "\\_SB.PCI0.PCI1.VGAC.NMAP",
169 /* A2D */ 167 /* Z96F */
170 "\\ACTD", 168 "\\_SB.PCI0.VGA.GETD",
171 /* A4G Z71A W1N W5A W5F M2N M3N M5N M6N S1N S5N */ 169 /* A2D */
172 "\\ADVG", 170 "\\ACTD",
173 /* P30 */ 171 /* A4G Z71A W1N W5A W5F M2N M3N M5N M6N S1N S5N */
174 "\\DNXT", 172 "\\ADVG",
175 /* A2H D1 L2D L3D L3H L2E L5D L5C M1A M2E L4L W3V */ 173 /* P30 */
176 "\\INFB", 174 "\\DNXT",
177 /* A3F A6F A3N A3L M6N W3N W6A */ 175 /* A2H D1 L2D L3D L3H L2E L5D L5C M1A M2E L4L W3V */
178 "\\SSTE"); 176 "\\INFB",
177 /* A3F A6F A3N A3L M6N W3N W6A */
178 "\\SSTE"};
179 179
180#define METHOD_ALS_CONTROL "ALSC" /* Z71A Z71V */ 180#define METHOD_ALS_CONTROL "ALSC" /* Z71A Z71V */
181#define METHOD_ALS_LEVEL "ALSL" /* Z71A Z71V */ 181#define METHOD_ALS_LEVEL "ALSL" /* Z71A Z71V */
@@ -426,7 +426,7 @@ static void asus_kled_cdev_set(struct led_classdev *led_cdev,
426 struct asus_led *led = container_of(led_cdev, struct asus_led, led); 426 struct asus_led *led = container_of(led_cdev, struct asus_led, led);
427 struct asus_laptop *asus = led->asus; 427 struct asus_laptop *asus = led->asus;
428 428
429 led->wk = value; 429 led->wk = value;
430 queue_work(asus->led_workqueue, &led->work); 430 queue_work(asus->led_workqueue, &led->work);
431} 431}
432 432
@@ -474,7 +474,7 @@ static int asus_led_register(struct asus_laptop *asus,
474 struct led_classdev *led_cdev = &led->led; 474 struct led_classdev *led_cdev = &led->led;
475 475
476 if (!method || acpi_check_handle(asus->handle, method, NULL)) 476 if (!method || acpi_check_handle(asus->handle, method, NULL))
477 return 0; /* Led not present */ 477 return 0; /* Led not present */
478 478
479 led->asus = asus; 479 led->asus = asus;
480 led->method = method; 480 led->method = method;
@@ -687,8 +687,8 @@ static ssize_t show_infos(struct device *dev,
687 acpi_status rv = AE_OK; 687 acpi_status rv = AE_OK;
688 688
689 /* 689 /*
690 * We use the easy way, we don't care of off and count, so we don't set eof 690 * We use the easy way, we don't care of off and count,
691 * to 1 691 * so we don't set eof to 1
692 */ 692 */
693 693
694 len += sprintf(page, ASUS_LAPTOP_NAME " " ASUS_LAPTOP_VERSION "\n"); 694 len += sprintf(page, ASUS_LAPTOP_NAME " " ASUS_LAPTOP_VERSION "\n");
@@ -904,7 +904,7 @@ static int read_display(struct asus_laptop *asus)
904 pr_warning("Error reading display status\n"); 904 pr_warning("Error reading display status\n");
905 } 905 }
906 906
907 value &= 0x0F; /* needed for some models, shouldn't hurt others */ 907 value &= 0x0F; /* needed for some models, shouldn't hurt others */
908 908
909 return value; 909 return value;
910} 910}
@@ -1041,7 +1041,7 @@ static ssize_t show_gps(struct device *dev,
1041static ssize_t store_gps(struct device *dev, struct device_attribute *attr, 1041static ssize_t store_gps(struct device *dev, struct device_attribute *attr,
1042 const char *buf, size_t count) 1042 const char *buf, size_t count)
1043{ 1043{
1044 struct asus_laptop *asus = dev_get_drvdata(dev); 1044 struct asus_laptop *asus = dev_get_drvdata(dev);
1045 int rv, value; 1045 int rv, value;
1046 int ret; 1046 int ret;
1047 1047