aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2007-05-06 08:48:22 -0400
committerLen Brown <len.brown@intel.com>2007-05-10 02:40:42 -0400
commitf398532722b44aa797915d6b784e8694b277c2c7 (patch)
tree37da99ea80f3041d0b5994d2ca00dda896c77220 /drivers
parent832d995029466e12aef66187bc9103487bf7be9f (diff)
asus-laptop: version bump and lindent
Version bump, lindent, etc .. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/asus-laptop.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index b39419cc2983..4f9060a2a2f2 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -48,7 +48,7 @@
48#include <acpi/acpi_bus.h> 48#include <acpi/acpi_bus.h>
49#include <asm/uaccess.h> 49#include <asm/uaccess.h>
50 50
51#define ASUS_LAPTOP_VERSION "0.41" 51#define ASUS_LAPTOP_VERSION "0.42"
52 52
53#define ASUS_HOTK_NAME "Asus Laptop Support" 53#define ASUS_HOTK_NAME "Asus Laptop Support"
54#define ASUS_HOTK_CLASS "hotkey" 54#define ASUS_HOTK_CLASS "hotkey"
@@ -83,7 +83,7 @@
83#define PLED_ON 0x20 //Phone LED 83#define PLED_ON 0x20 //Phone LED
84#define GLED_ON 0x40 //Gaming LED 84#define GLED_ON 0x40 //Gaming LED
85#define LCD_ON 0x80 //LCD backlight 85#define LCD_ON 0x80 //LCD backlight
86#define GPS_ON 0x100 //GPS 86#define GPS_ON 0x100 //GPS
87 87
88#define ASUS_LOG ASUS_HOTK_FILE ": " 88#define ASUS_LOG ASUS_HOTK_FILE ": "
89#define ASUS_ERR KERN_ERR ASUS_LOG 89#define ASUS_ERR KERN_ERR ASUS_LOG
@@ -149,7 +149,7 @@ ASUS_HANDLE(display_set, ASUS_HOTK_PREFIX "SDSP");
149ASUS_HANDLE(display_get, "\\_SB.PCI0.P0P1.VGA.GETD", /* A6B, A6K A6R A7D F3JM L4R M6R A3G 149ASUS_HANDLE(display_get, "\\_SB.PCI0.P0P1.VGA.GETD", /* A6B, A6K A6R A7D F3JM L4R M6R A3G
150 M6A M6V VX-1 V6J V6V W3Z */ 150 M6A M6V VX-1 V6J V6V W3Z */
151 "\\_SB.PCI0.P0P2.VGA.GETD", /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V 151 "\\_SB.PCI0.P0P2.VGA.GETD", /* A3E A4K, A4D A4L A6J A7J A8J Z71V M9V
152 S5A M5A z33A W1Jc W2V */ 152 S5A M5A z33A W1Jc W2V G1 */
153 "\\_SB.PCI0.P0P3.VGA.GETD", /* A6V A6Q */ 153 "\\_SB.PCI0.P0P3.VGA.GETD", /* A6V A6Q */
154 "\\_SB.PCI0.P0PA.VGA.GETD", /* A6T, A6M */ 154 "\\_SB.PCI0.P0PA.VGA.GETD", /* A6T, A6M */
155 "\\_SB.PCI0.PCI1.VGAC.NMAP", /* L3C */ 155 "\\_SB.PCI0.PCI1.VGAC.NMAP", /* L3C */
@@ -165,8 +165,8 @@ ASUS_HANDLE(ls_level, ASUS_HOTK_PREFIX "ALSL"); /* Z71A Z71V */
165 165
166/* GPS */ 166/* GPS */
167/* R2H use different handle for GPS on/off */ 167/* R2H use different handle for GPS on/off */
168ASUS_HANDLE(gps_on, ASUS_HOTK_PREFIX "SDON"); /* R2H */ 168ASUS_HANDLE(gps_on, ASUS_HOTK_PREFIX "SDON"); /* R2H */
169ASUS_HANDLE(gps_off, ASUS_HOTK_PREFIX "SDOF"); /* R2H */ 169ASUS_HANDLE(gps_off, ASUS_HOTK_PREFIX "SDOF"); /* R2H */
170ASUS_HANDLE(gps_status, ASUS_HOTK_PREFIX "GPST"); 170ASUS_HANDLE(gps_status, ASUS_HOTK_PREFIX "GPST");
171 171
172/* 172/*
@@ -285,17 +285,18 @@ static int read_wireless_status(int mask)
285 return (hotk->status & mask) ? 1 : 0; 285 return (hotk->status & mask) ? 1 : 0;
286} 286}
287 287
288static int read_gps_status(void) { 288static int read_gps_status(void)
289 ulong status; 289{
290 ulong status;
290 acpi_status rv = AE_OK; 291 acpi_status rv = AE_OK;
291 292
292 rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status); 293 rv = acpi_evaluate_integer(gps_status_handle, NULL, NULL, &status);
293 if (ACPI_FAILURE(rv)) 294 if (ACPI_FAILURE(rv))
294 printk(ASUS_WARNING "Error reading GPS status\n"); 295 printk(ASUS_WARNING "Error reading GPS status\n");
295 else 296 else
296 return status ? 1 : 0; 297 return status ? 1 : 0;
297 298
298 return (hotk->status & GPS_ON) ? 1 : 0; 299 return (hotk->status & GPS_ON) ? 1 : 0;
299} 300}
300 301
301/* Generic LED functions */ 302/* Generic LED functions */
@@ -304,8 +305,8 @@ static int read_status(int mask)
304 /* There is a special method for both wireless devices */ 305 /* There is a special method for both wireless devices */
305 if (mask == BT_ON || mask == WL_ON) 306 if (mask == BT_ON || mask == WL_ON)
306 return read_wireless_status(mask); 307 return read_wireless_status(mask);
307 else if(mask == GPS_ON) 308 else if (mask == GPS_ON)
308 return read_gps_status(); 309 return read_gps_status();
309 310
310 return (hotk->status & mask) ? 1 : 0; 311 return (hotk->status & mask) ? 1 : 0;
311} 312}
@@ -705,7 +706,7 @@ static ssize_t show_gps(struct device *dev,
705static ssize_t store_gps(struct device *dev, struct device_attribute *attr, 706static ssize_t store_gps(struct device *dev, struct device_attribute *attr,
706 const char *buf, size_t count) 707 const char *buf, size_t count)
707{ 708{
708 return store_status(buf, count, NULL, GPS_ON); 709 return store_status(buf, count, NULL, GPS_ON);
709} 710}
710 711
711static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) 712static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
@@ -807,7 +808,7 @@ static void asus_hotk_add_fs(void)
807 ASUS_SET_DEVICE_ATTR(ls_switch, 0644, show_lssw, store_lssw); 808 ASUS_SET_DEVICE_ATTR(ls_switch, 0644, show_lssw, store_lssw);
808 } 809 }
809 810
810 if(gps_status_handle && gps_on_handle && gps_off_handle) 811 if (gps_status_handle && gps_on_handle && gps_off_handle)
811 ASUS_SET_DEVICE_ATTR(gps, 0644, show_gps, store_gps); 812 ASUS_SET_DEVICE_ATTR(gps, 0644, show_gps, store_gps);
812} 813}
813 814