aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/hp_accel.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2009-03-31 18:24:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:21 -0400
commitbe84cfc588b19f14764d78556dc7b630ee8c914c (patch)
treeeb9e812f10199e8a8bddf8dd8f9dfa2f02b04e62 /drivers/hwmon/hp_accel.c
parent2b872903c5d66bccdf4306a35e3e94d4da8555d3 (diff)
hp_accel: adev is poor name of exported symbol
As Andrew noted, adev is pretty poor name for symbol being exported. Rename it to lis3. Signed-off-by: Pavel Machek <pavel@ucw.cz> Cc: Eric Piel <eric.piel@tremplin-utc.net> Cc: Vladimir Botka <vbotka@suse.cz> Cc: <Quoc.Pham@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/hwmon/hp_accel.c')
-rw-r--r--drivers/hwmon/hp_accel.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c
index 29c83b5b9697..ee1ed4270df7 100644
--- a/drivers/hwmon/hp_accel.c
+++ b/drivers/hwmon/hp_accel.c
@@ -140,7 +140,7 @@ acpi_status lis3lv02d_acpi_write(acpi_handle handle, int reg, u8 val)
140 140
141static int lis3lv02d_dmi_matched(const struct dmi_system_id *dmi) 141static int lis3lv02d_dmi_matched(const struct dmi_system_id *dmi)
142{ 142{
143 adev.ac = *((struct axis_conversion *)dmi->driver_data); 143 lis3_dev.ac = *((struct axis_conversion *)dmi->driver_data);
144 printk(KERN_INFO DRIVER_NAME ": hardware type %s found.\n", dmi->ident); 144 printk(KERN_INFO DRIVER_NAME ": hardware type %s found.\n", dmi->ident);
145 145
146 return 1; 146 return 1;
@@ -214,7 +214,7 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = {
214 214
215static void hpled_set(struct delayed_led_classdev *led_cdev, enum led_brightness value) 215static void hpled_set(struct delayed_led_classdev *led_cdev, enum led_brightness value)
216{ 216{
217 acpi_handle handle = adev.device->handle; 217 acpi_handle handle = lis3_dev.device->handle;
218 unsigned long long ret; /* Not used when writing */ 218 unsigned long long ret; /* Not used when writing */
219 union acpi_object in_obj[1]; 219 union acpi_object in_obj[1];
220 struct acpi_object_list args = { 1, in_obj }; 220 struct acpi_object_list args = { 1, in_obj };
@@ -254,7 +254,7 @@ static void lis3lv02d_enum_resources(struct acpi_device *device)
254 acpi_status status; 254 acpi_status status;
255 255
256 status = acpi_walk_resources(device->handle, METHOD_NAME__CRS, 256 status = acpi_walk_resources(device->handle, METHOD_NAME__CRS,
257 lis3lv02d_get_resource, &adev.irq); 257 lis3lv02d_get_resource, &lis3_dev.irq);
258 if (ACPI_FAILURE(status)) 258 if (ACPI_FAILURE(status))
259 printk(KERN_DEBUG DRIVER_NAME ": Error getting resources\n"); 259 printk(KERN_DEBUG DRIVER_NAME ": Error getting resources\n");
260} 260}
@@ -263,8 +263,8 @@ static s16 lis3lv02d_read_16(acpi_handle handle, int reg)
263{ 263{
264 u8 lo, hi; 264 u8 lo, hi;
265 265
266 adev.read(handle, reg - 1, &lo); 266 lis3_dev.read(handle, reg - 1, &lo);
267 adev.read(handle, reg, &hi); 267 lis3_dev.read(handle, reg, &hi);
268 /* In "12 bit right justified" mode, bit 6, bit 7, bit 8 = bit 5 */ 268 /* In "12 bit right justified" mode, bit 6, bit 7, bit 8 = bit 5 */
269 return (s16)((hi << 8) | lo); 269 return (s16)((hi << 8) | lo);
270} 270}
@@ -272,7 +272,7 @@ static s16 lis3lv02d_read_16(acpi_handle handle, int reg)
272static s16 lis3lv02d_read_8(acpi_handle handle, int reg) 272static s16 lis3lv02d_read_8(acpi_handle handle, int reg)
273{ 273{
274 s8 lo; 274 s8 lo;
275 adev.read(handle, reg, &lo); 275 lis3_dev.read(handle, reg, &lo);
276 return lo; 276 return lo;
277} 277}
278 278
@@ -283,29 +283,29 @@ static int lis3lv02d_add(struct acpi_device *device)
283 if (!device) 283 if (!device)
284 return -EINVAL; 284 return -EINVAL;
285 285
286 adev.device = device; 286 lis3_dev.device = device;
287 adev.init = lis3lv02d_acpi_init; 287 lis3_dev.init = lis3lv02d_acpi_init;
288 adev.read = lis3lv02d_acpi_read; 288 lis3_dev.read = lis3lv02d_acpi_read;
289 adev.write = lis3lv02d_acpi_write; 289 lis3_dev.write = lis3lv02d_acpi_write;
290 strcpy(acpi_device_name(device), DRIVER_NAME); 290 strcpy(acpi_device_name(device), DRIVER_NAME);
291 strcpy(acpi_device_class(device), ACPI_MDPS_CLASS); 291 strcpy(acpi_device_class(device), ACPI_MDPS_CLASS);
292 device->driver_data = &adev; 292 device->driver_data = &lis3_dev;
293 293
294 lis3lv02d_acpi_read(device->handle, WHO_AM_I, &adev.whoami); 294 lis3lv02d_acpi_read(device->handle, WHO_AM_I, &lis3_dev.whoami);
295 switch (adev.whoami) { 295 switch (lis3_dev.whoami) {
296 case LIS_DOUBLE_ID: 296 case LIS_DOUBLE_ID:
297 printk(KERN_INFO DRIVER_NAME ": 2-byte sensor found\n"); 297 printk(KERN_INFO DRIVER_NAME ": 2-byte sensor found\n");
298 adev.read_data = lis3lv02d_read_16; 298 lis3_dev.read_data = lis3lv02d_read_16;
299 adev.mdps_max_val = 2048; 299 lis3_dev.mdps_max_val = 2048;
300 break; 300 break;
301 case LIS_SINGLE_ID: 301 case LIS_SINGLE_ID:
302 printk(KERN_INFO DRIVER_NAME ": 1-byte sensor found\n"); 302 printk(KERN_INFO DRIVER_NAME ": 1-byte sensor found\n");
303 adev.read_data = lis3lv02d_read_8; 303 lis3_dev.read_data = lis3lv02d_read_8;
304 adev.mdps_max_val = 128; 304 lis3_dev.mdps_max_val = 128;
305 break; 305 break;
306 default: 306 default:
307 printk(KERN_ERR DRIVER_NAME 307 printk(KERN_ERR DRIVER_NAME
308 ": unknown sensor type 0x%X\n", adev.whoami); 308 ": unknown sensor type 0x%X\n", lis3_dev.whoami);
309 return -EINVAL; 309 return -EINVAL;
310 } 310 }
311 311
@@ -313,7 +313,7 @@ static int lis3lv02d_add(struct acpi_device *device)
313 if (dmi_check_system(lis3lv02d_dmi_ids) == 0) { 313 if (dmi_check_system(lis3lv02d_dmi_ids) == 0) {
314 printk(KERN_INFO DRIVER_NAME ": laptop model unknown, " 314 printk(KERN_INFO DRIVER_NAME ": laptop model unknown, "
315 "using default axes configuration\n"); 315 "using default axes configuration\n");
316 adev.ac = lis3lv02d_axis_normal; 316 lis3_dev.ac = lis3lv02d_axis_normal;
317 } 317 }
318 318
319 INIT_WORK(&hpled_led.work, delayed_set_status_worker); 319 INIT_WORK(&hpled_led.work, delayed_set_status_worker);
@@ -322,9 +322,9 @@ static int lis3lv02d_add(struct acpi_device *device)
322 return ret; 322 return ret;
323 323
324 /* obtain IRQ number of our device from ACPI */ 324 /* obtain IRQ number of our device from ACPI */
325 lis3lv02d_enum_resources(adev.device); 325 lis3lv02d_enum_resources(lis3_dev.device);
326 326
327 ret = lis3lv02d_init_device(&adev); 327 ret = lis3lv02d_init_device(&lis3_dev);
328 if (ret) { 328 if (ret) {
329 flush_work(&hpled_led.work); 329 flush_work(&hpled_led.work);
330 led_classdev_unregister(&hpled_led.led_classdev); 330 led_classdev_unregister(&hpled_led.led_classdev);
@@ -360,12 +360,12 @@ static int lis3lv02d_suspend(struct acpi_device *device, pm_message_t state)
360static int lis3lv02d_resume(struct acpi_device *device) 360static int lis3lv02d_resume(struct acpi_device *device)
361{ 361{
362 /* put back the device in the right state (ACPI might turn it on) */ 362 /* put back the device in the right state (ACPI might turn it on) */
363 mutex_lock(&adev.lock); 363 mutex_lock(&lis3_dev.lock);
364 if (adev.usage > 0) 364 if (lis3_dev.usage > 0)
365 lis3lv02d_poweron(device->handle); 365 lis3lv02d_poweron(device->handle);
366 else 366 else
367 lis3lv02d_poweroff(device->handle); 367 lis3lv02d_poweroff(device->handle);
368 mutex_unlock(&adev.lock); 368 mutex_unlock(&lis3_dev.lock);
369 return 0; 369 return 0;
370} 370}
371#else 371#else