aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/sony-laptop.c186
1 files changed, 93 insertions, 93 deletions
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c
index ac708bc2f9f3..e67189a361a2 100644
--- a/drivers/misc/sony-laptop.c
+++ b/drivers/misc/sony-laptop.c
@@ -35,9 +35,9 @@
35#include <acpi/acpi_bus.h> 35#include <acpi/acpi_bus.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37 37
38#define ACPI_SNC_CLASS "sony" 38#define SONY_NC_CLASS "sony"
39#define ACPI_SNC_HID "SNY5001" 39#define SONY_NC_HID "SNY5001"
40#define ACPI_SNC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.4" 40#define SONY_NC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.4"
41 41
42/* the device uses 1-based values, while the backlight subsystem uses 42/* the device uses 1-based values, while the backlight subsystem uses
43 0-based values */ 43 0-based values */
@@ -46,7 +46,7 @@
46#define LOG_PFX KERN_WARNING "sony-laptop: " 46#define LOG_PFX KERN_WARNING "sony-laptop: "
47 47
48MODULE_AUTHOR("Stelian Pop, Mattia Dongili"); 48MODULE_AUTHOR("Stelian Pop, Mattia Dongili");
49MODULE_DESCRIPTION(ACPI_SNC_DRIVER_NAME); 49MODULE_DESCRIPTION(SONY_NC_DRIVER_NAME);
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51 51
52static int debug; 52static int debug;
@@ -54,9 +54,9 @@ module_param(debug, int, 0);
54MODULE_PARM_DESC(debug, "set this to 1 (and RTFM) if you want to help " 54MODULE_PARM_DESC(debug, "set this to 1 (and RTFM) if you want to help "
55 "the development of this driver"); 55 "the development of this driver");
56 56
57static ssize_t sony_acpi_show(struct device *, struct device_attribute *, 57static ssize_t sony_nc_sysfs_show(struct device *, struct device_attribute *,
58 char *); 58 char *);
59static ssize_t sony_acpi_store(struct device *, struct device_attribute *, 59static ssize_t sony_nc_sysfs_store(struct device *, struct device_attribute *,
60 const char *, size_t); 60 const char *, size_t);
61static int boolean_validate(const int, const int); 61static int boolean_validate(const int, const int);
62static int brightness_default_validate(const int, const int); 62static int brightness_default_validate(const int, const int);
@@ -64,7 +64,7 @@ static int brightness_default_validate(const int, const int);
64#define SNC_VALIDATE_IN 0 64#define SNC_VALIDATE_IN 0
65#define SNC_VALIDATE_OUT 1 65#define SNC_VALIDATE_OUT 1
66 66
67struct sony_acpi_value { 67struct sony_nc_value {
68 char *name; /* name of the entry */ 68 char *name; /* name of the entry */
69 char **acpiget; /* names of the ACPI get function */ 69 char **acpiget; /* names of the ACPI get function */
70 char **acpiset; /* names of the ACPI set function */ 70 char **acpiset; /* names of the ACPI set function */
@@ -75,65 +75,65 @@ struct sony_acpi_value {
75 struct device_attribute devattr; /* sysfs atribute */ 75 struct device_attribute devattr; /* sysfs atribute */
76}; 76};
77 77
78#define HANDLE_NAMES(_name, _values...) \ 78#define SNC_HANDLE_NAMES(_name, _values...) \
79 static char *snc_##_name[] = { _values, NULL } 79 static char *snc_##_name[] = { _values, NULL }
80 80
81#define SONY_ACPI_VALUE(_name, _getters, _setters, _validate, _debug) \ 81#define SNC_HANDLE(_name, _getters, _setters, _validate, _debug) \
82 { \ 82 { \
83 .name = __stringify(_name), \ 83 .name = __stringify(_name), \
84 .acpiget = _getters, \ 84 .acpiget = _getters, \
85 .acpiset = _setters, \ 85 .acpiset = _setters, \
86 .validate = _validate, \ 86 .validate = _validate, \
87 .debug = _debug, \ 87 .debug = _debug, \
88 .devattr = __ATTR(_name, 0, sony_acpi_show, sony_acpi_store), \ 88 .devattr = __ATTR(_name, 0, sony_nc_sysfs_show, sony_nc_sysfs_store), \
89 } 89 }
90 90
91#define SONY_ACPI_VALUE_NULL { .name = NULL } 91#define SNC_HANDLE_NULL { .name = NULL }
92 92
93HANDLE_NAMES(fnkey_get, "GHKE"); 93SNC_HANDLE_NAMES(fnkey_get, "GHKE");
94 94
95HANDLE_NAMES(brightness_def_get, "GPBR"); 95SNC_HANDLE_NAMES(brightness_def_get, "GPBR");
96HANDLE_NAMES(brightness_def_set, "SPBR"); 96SNC_HANDLE_NAMES(brightness_def_set, "SPBR");
97 97
98HANDLE_NAMES(cdpower_get, "GCDP"); 98SNC_HANDLE_NAMES(cdpower_get, "GCDP");
99HANDLE_NAMES(cdpower_set, "SCDP", "CDPW"); 99SNC_HANDLE_NAMES(cdpower_set, "SCDP", "CDPW");
100 100
101HANDLE_NAMES(audiopower_get, "GAZP"); 101SNC_HANDLE_NAMES(audiopower_get, "GAZP");
102HANDLE_NAMES(audiopower_set, "AZPW"); 102SNC_HANDLE_NAMES(audiopower_set, "AZPW");
103 103
104HANDLE_NAMES(lanpower_get, "GLNP"); 104SNC_HANDLE_NAMES(lanpower_get, "GLNP");
105HANDLE_NAMES(lanpower_set, "LNPW"); 105SNC_HANDLE_NAMES(lanpower_set, "LNPW");
106 106
107HANDLE_NAMES(PID_get, "GPID"); 107SNC_HANDLE_NAMES(PID_get, "GPID");
108 108
109HANDLE_NAMES(CTR_get, "GCTR"); 109SNC_HANDLE_NAMES(CTR_get, "GCTR");
110HANDLE_NAMES(CTR_set, "SCTR"); 110SNC_HANDLE_NAMES(CTR_set, "SCTR");
111 111
112HANDLE_NAMES(PCR_get, "GPCR"); 112SNC_HANDLE_NAMES(PCR_get, "GPCR");
113HANDLE_NAMES(PCR_set, "SPCR"); 113SNC_HANDLE_NAMES(PCR_set, "SPCR");
114 114
115HANDLE_NAMES(CMI_get, "GCMI"); 115SNC_HANDLE_NAMES(CMI_get, "GCMI");
116HANDLE_NAMES(CMI_set, "SCMI"); 116SNC_HANDLE_NAMES(CMI_set, "SCMI");
117 117
118static struct sony_acpi_value sony_acpi_values[] = { 118static struct sony_nc_value sony_nc_values[] = {
119 SONY_ACPI_VALUE(brightness_default, snc_brightness_def_get, 119 SNC_HANDLE(brightness_default, snc_brightness_def_get,
120 snc_brightness_def_set, brightness_default_validate, 0), 120 snc_brightness_def_set, brightness_default_validate, 0),
121 SONY_ACPI_VALUE(fnkey, snc_fnkey_get, NULL, NULL, 0), 121 SNC_HANDLE(fnkey, snc_fnkey_get, NULL, NULL, 0),
122 SONY_ACPI_VALUE(cdpower, snc_cdpower_get, snc_cdpower_set, boolean_validate, 0), 122 SNC_HANDLE(cdpower, snc_cdpower_get, snc_cdpower_set, boolean_validate, 0),
123 SONY_ACPI_VALUE(audiopower, snc_audiopower_get, snc_audiopower_set, 123 SNC_HANDLE(audiopower, snc_audiopower_get, snc_audiopower_set,
124 boolean_validate, 0), 124 boolean_validate, 0),
125 SONY_ACPI_VALUE(lanpower, snc_lanpower_get, snc_lanpower_set, 125 SNC_HANDLE(lanpower, snc_lanpower_get, snc_lanpower_set,
126 boolean_validate, 1), 126 boolean_validate, 1),
127 /* unknown methods */ 127 /* unknown methods */
128 SONY_ACPI_VALUE(PID, snc_PID_get, NULL, NULL, 1), 128 SNC_HANDLE(PID, snc_PID_get, NULL, NULL, 1),
129 SONY_ACPI_VALUE(CTR, snc_CTR_get, snc_CTR_set, NULL, 1), 129 SNC_HANDLE(CTR, snc_CTR_get, snc_CTR_set, NULL, 1),
130 SONY_ACPI_VALUE(PCR, snc_PCR_get, snc_PCR_set, NULL, 1), 130 SNC_HANDLE(PCR, snc_PCR_get, snc_PCR_set, NULL, 1),
131 SONY_ACPI_VALUE(CMI, snc_CMI_get, snc_CMI_set, NULL, 1), 131 SNC_HANDLE(CMI, snc_CMI_get, snc_CMI_set, NULL, 1),
132 SONY_ACPI_VALUE_NULL 132 SNC_HANDLE_NULL
133}; 133};
134 134
135static acpi_handle sony_acpi_handle; 135static acpi_handle sony_nc_acpi_handle;
136static struct acpi_device *sony_acpi_acpi_device = NULL; 136static struct acpi_device *sony_nc_acpi_device = NULL;
137 137
138/* 138/*
139 * acpi_evaluate_object wrappers 139 * acpi_evaluate_object wrappers
@@ -194,7 +194,7 @@ static int acpi_callsetfunc(acpi_handle handle, char *name, int value,
194} 194}
195 195
196/* 196/*
197 * sony_acpi_values input/output validate functions 197 * sony_nc_values input/output validate functions
198 */ 198 */
199 199
200/* brightness_default_validate: 200/* brightness_default_validate:
@@ -229,19 +229,19 @@ static int boolean_validate(const int direction, const int value)
229} 229}
230 230
231/* 231/*
232 * Sysfs show/store common to all sony_acpi_values 232 * Sysfs show/store common to all sony_nc_values
233 */ 233 */
234static ssize_t sony_acpi_show(struct device *dev, struct device_attribute *attr, 234static ssize_t sony_nc_sysfs_show(struct device *dev, struct device_attribute *attr,
235 char *buffer) 235 char *buffer)
236{ 236{
237 int value; 237 int value;
238 struct sony_acpi_value *item = 238 struct sony_nc_value *item =
239 container_of(attr, struct sony_acpi_value, devattr); 239 container_of(attr, struct sony_nc_value, devattr);
240 240
241 if (!*item->acpiget) 241 if (!*item->acpiget)
242 return -EIO; 242 return -EIO;
243 243
244 if (acpi_callgetfunc(sony_acpi_handle, *item->acpiget, &value) < 0) 244 if (acpi_callgetfunc(sony_nc_acpi_handle, *item->acpiget, &value) < 0)
245 return -EIO; 245 return -EIO;
246 246
247 if (item->validate) 247 if (item->validate)
@@ -250,13 +250,13 @@ static ssize_t sony_acpi_show(struct device *dev, struct device_attribute *attr,
250 return snprintf(buffer, PAGE_SIZE, "%d\n", value); 250 return snprintf(buffer, PAGE_SIZE, "%d\n", value);
251} 251}
252 252
253static ssize_t sony_acpi_store(struct device *dev, 253static ssize_t sony_nc_sysfs_store(struct device *dev,
254 struct device_attribute *attr, 254 struct device_attribute *attr,
255 const char *buffer, size_t count) 255 const char *buffer, size_t count)
256{ 256{
257 int value; 257 int value;
258 struct sony_acpi_value *item = 258 struct sony_nc_value *item =
259 container_of(attr, struct sony_acpi_value, devattr); 259 container_of(attr, struct sony_nc_value, devattr);
260 260
261 if (!item->acpiset) 261 if (!item->acpiset)
262 return -EIO; 262 return -EIO;
@@ -272,7 +272,7 @@ static ssize_t sony_acpi_store(struct device *dev,
272 if (value < 0) 272 if (value < 0)
273 return value; 273 return value;
274 274
275 if (acpi_callsetfunc(sony_acpi_handle, *item->acpiset, value, NULL) < 0) 275 if (acpi_callsetfunc(sony_nc_acpi_handle, *item->acpiset, value, NULL) < 0)
276 return -EIO; 276 return -EIO;
277 item->value = value; 277 item->value = value;
278 item->valid = 1; 278 item->valid = 1;
@@ -290,10 +290,10 @@ static struct platform_driver sncpf_driver = {
290}; 290};
291static struct platform_device *sncpf_device; 291static struct platform_device *sncpf_device;
292 292
293static int sony_snc_pf_add(void) 293static int sony_nc_pf_add(void)
294{ 294{
295 acpi_handle handle; 295 acpi_handle handle;
296 struct sony_acpi_value *item; 296 struct sony_nc_value *item;
297 int ret = 0; 297 int ret = 0;
298 298
299 ret = platform_driver_register(&sncpf_driver); 299 ret = platform_driver_register(&sncpf_driver);
@@ -310,14 +310,14 @@ static int sony_snc_pf_add(void)
310 if (ret) 310 if (ret)
311 goto out_platform_alloced; 311 goto out_platform_alloced;
312 312
313 for (item = sony_acpi_values; item->name; ++item) { 313 for (item = sony_nc_values; item->name; ++item) {
314 314
315 if (!debug && item->debug) 315 if (!debug && item->debug)
316 continue; 316 continue;
317 317
318 /* find the available acpiget as described in the DSDT */ 318 /* find the available acpiget as described in the DSDT */
319 for (; item->acpiget && *item->acpiget; ++item->acpiget) { 319 for (; item->acpiget && *item->acpiget; ++item->acpiget) {
320 if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, 320 if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle,
321 *item->acpiget, 321 *item->acpiget,
322 &handle))) { 322 &handle))) {
323 if (debug) 323 if (debug)
@@ -330,7 +330,7 @@ static int sony_snc_pf_add(void)
330 330
331 /* find the available acpiset as described in the DSDT */ 331 /* find the available acpiset as described in the DSDT */
332 for (; item->acpiset && *item->acpiset; ++item->acpiset) { 332 for (; item->acpiset && *item->acpiset; ++item->acpiset) {
333 if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, 333 if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle,
334 *item->acpiset, 334 *item->acpiset,
335 &handle))) { 335 &handle))) {
336 if (debug) 336 if (debug)
@@ -353,7 +353,7 @@ static int sony_snc_pf_add(void)
353 return 0; 353 return 0;
354 354
355 out_sysfs: 355 out_sysfs:
356 for (item = sony_acpi_values; item->name; ++item) { 356 for (item = sony_nc_values; item->name; ++item) {
357 device_remove_file(&sncpf_device->dev, &item->devattr); 357 device_remove_file(&sncpf_device->dev, &item->devattr);
358 } 358 }
359 platform_device_del(sncpf_device); 359 platform_device_del(sncpf_device);
@@ -365,11 +365,11 @@ static int sony_snc_pf_add(void)
365 return ret; 365 return ret;
366} 366}
367 367
368static void sony_snc_pf_remove(void) 368static void sony_nc_pf_remove(void)
369{ 369{
370 struct sony_acpi_value *item; 370 struct sony_nc_value *item;
371 371
372 for (item = sony_acpi_values; item->name; ++item) { 372 for (item = sony_nc_values; item->name; ++item) {
373 device_remove_file(&sncpf_device->dev, &item->devattr); 373 device_remove_file(&sncpf_device->dev, &item->devattr);
374 } 374 }
375 375
@@ -383,7 +383,7 @@ static void sony_snc_pf_remove(void)
383 */ 383 */
384static int sony_backlight_update_status(struct backlight_device *bd) 384static int sony_backlight_update_status(struct backlight_device *bd)
385{ 385{
386 return acpi_callsetfunc(sony_acpi_handle, "SBRT", 386 return acpi_callsetfunc(sony_nc_acpi_handle, "SBRT",
387 bd->props.brightness + 1, NULL); 387 bd->props.brightness + 1, NULL);
388} 388}
389 389
@@ -391,7 +391,7 @@ static int sony_backlight_get_brightness(struct backlight_device *bd)
391{ 391{
392 int value; 392 int value;
393 393
394 if (acpi_callgetfunc(sony_acpi_handle, "GBRT", &value)) 394 if (acpi_callgetfunc(sony_nc_acpi_handle, "GBRT", &value))
395 return 0; 395 return 0;
396 /* brightness levels are 1-based, while backlight ones are 0-based */ 396 /* brightness levels are 1-based, while backlight ones are 0-based */
397 return value - 1; 397 return value - 1;
@@ -410,7 +410,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
410{ 410{
411 if (debug) 411 if (debug)
412 printk(LOG_PFX "sony_acpi_notify, event: %d\n", event); 412 printk(LOG_PFX "sony_acpi_notify, event: %d\n", event);
413 acpi_bus_generate_event(sony_acpi_acpi_device, 1, event); 413 acpi_bus_generate_event(sony_nc_acpi_device, 1, event);
414} 414}
415 415
416static acpi_status sony_walk_callback(acpi_handle handle, u32 level, 416static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -431,16 +431,16 @@ static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
431/* 431/*
432 * ACPI device 432 * ACPI device
433 */ 433 */
434static int sony_acpi_resume(struct acpi_device *device) 434static int sony_nc_resume(struct acpi_device *device)
435{ 435{
436 struct sony_acpi_value *item; 436 struct sony_nc_value *item;
437 437
438 for (item = sony_acpi_values; item->name; item++) { 438 for (item = sony_nc_values; item->name; item++) {
439 int ret; 439 int ret;
440 440
441 if (!item->valid) 441 if (!item->valid)
442 continue; 442 continue;
443 ret = acpi_callsetfunc(sony_acpi_handle, *item->acpiset, 443 ret = acpi_callsetfunc(sony_nc_acpi_handle, *item->acpiset,
444 item->value, NULL); 444 item->value, NULL);
445 if (ret < 0) { 445 if (ret < 0) {
446 printk("%s: %d\n", __FUNCTION__, ret); 446 printk("%s: %d\n", __FUNCTION__, ret);
@@ -450,18 +450,18 @@ static int sony_acpi_resume(struct acpi_device *device)
450 return 0; 450 return 0;
451} 451}
452 452
453static int sony_acpi_add(struct acpi_device *device) 453static int sony_nc_add(struct acpi_device *device)
454{ 454{
455 acpi_status status; 455 acpi_status status;
456 int result = 0; 456 int result = 0;
457 acpi_handle handle; 457 acpi_handle handle;
458 458
459 sony_acpi_acpi_device = device; 459 sony_nc_acpi_device = device;
460 460
461 sony_acpi_handle = device->handle; 461 sony_nc_acpi_handle = device->handle;
462 462
463 if (debug) { 463 if (debug) {
464 status = acpi_walk_namespace(ACPI_TYPE_METHOD, sony_acpi_handle, 464 status = acpi_walk_namespace(ACPI_TYPE_METHOD, sony_nc_acpi_handle,
465 1, sony_walk_callback, NULL, NULL); 465 1, sony_walk_callback, NULL, NULL);
466 if (ACPI_FAILURE(status)) { 466 if (ACPI_FAILURE(status)) {
467 printk(LOG_PFX "unable to walk acpi resources\n"); 467 printk(LOG_PFX "unable to walk acpi resources\n");
@@ -470,7 +470,7 @@ static int sony_acpi_add(struct acpi_device *device)
470 } 470 }
471 } 471 }
472 472
473 status = acpi_install_notify_handler(sony_acpi_handle, 473 status = acpi_install_notify_handler(sony_nc_acpi_handle,
474 ACPI_DEVICE_NOTIFY, 474 ACPI_DEVICE_NOTIFY,
475 sony_acpi_notify, NULL); 475 sony_acpi_notify, NULL);
476 if (ACPI_FAILURE(status)) { 476 if (ACPI_FAILURE(status)) {
@@ -479,7 +479,7 @@ static int sony_acpi_add(struct acpi_device *device)
479 goto outwalk; 479 goto outwalk;
480 } 480 }
481 481
482 if (ACPI_SUCCESS(acpi_get_handle(sony_acpi_handle, "GBRT", &handle))) { 482 if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "GBRT", &handle))) {
483 sony_backlight_device = backlight_device_register("sony", NULL, 483 sony_backlight_device = backlight_device_register("sony", NULL,
484 NULL, 484 NULL,
485 &sony_backlight_ops); 485 &sony_backlight_ops);
@@ -497,10 +497,10 @@ static int sony_acpi_add(struct acpi_device *device)
497 497
498 } 498 }
499 499
500 if (sony_snc_pf_add()) 500 if (sony_nc_pf_add())
501 goto outbacklight; 501 goto outbacklight;
502 502
503 printk(KERN_INFO ACPI_SNC_DRIVER_NAME " successfully installed\n"); 503 printk(KERN_INFO SONY_NC_DRIVER_NAME " successfully installed\n");
504 504
505 return 0; 505 return 0;
506 506
@@ -508,7 +508,7 @@ static int sony_acpi_add(struct acpi_device *device)
508 if (sony_backlight_device) 508 if (sony_backlight_device)
509 backlight_device_unregister(sony_backlight_device); 509 backlight_device_unregister(sony_backlight_device);
510 510
511 status = acpi_remove_notify_handler(sony_acpi_handle, 511 status = acpi_remove_notify_handler(sony_nc_acpi_handle,
512 ACPI_DEVICE_NOTIFY, 512 ACPI_DEVICE_NOTIFY,
513 sony_acpi_notify); 513 sony_acpi_notify);
514 if (ACPI_FAILURE(status)) 514 if (ACPI_FAILURE(status))
@@ -517,48 +517,48 @@ static int sony_acpi_add(struct acpi_device *device)
517 return result; 517 return result;
518} 518}
519 519
520static int sony_acpi_remove(struct acpi_device *device, int type) 520static int sony_nc_remove(struct acpi_device *device, int type)
521{ 521{
522 acpi_status status; 522 acpi_status status;
523 523
524 if (sony_backlight_device) 524 if (sony_backlight_device)
525 backlight_device_unregister(sony_backlight_device); 525 backlight_device_unregister(sony_backlight_device);
526 526
527 sony_acpi_acpi_device = NULL; 527 sony_nc_acpi_device = NULL;
528 528
529 status = acpi_remove_notify_handler(sony_acpi_handle, 529 status = acpi_remove_notify_handler(sony_nc_acpi_handle,
530 ACPI_DEVICE_NOTIFY, 530 ACPI_DEVICE_NOTIFY,
531 sony_acpi_notify); 531 sony_acpi_notify);
532 if (ACPI_FAILURE(status)) 532 if (ACPI_FAILURE(status))
533 printk(LOG_PFX "unable to remove notify handler\n"); 533 printk(LOG_PFX "unable to remove notify handler\n");
534 534
535 sony_snc_pf_remove(); 535 sony_nc_pf_remove();
536 536
537 printk(KERN_INFO ACPI_SNC_DRIVER_NAME " successfully removed\n"); 537 printk(KERN_INFO SONY_NC_DRIVER_NAME " successfully removed\n");
538 538
539 return 0; 539 return 0;
540} 540}
541 541
542static struct acpi_driver sony_acpi_driver = { 542static struct acpi_driver sony_nc_driver = {
543 .name = ACPI_SNC_DRIVER_NAME, 543 .name = SONY_NC_DRIVER_NAME,
544 .class = ACPI_SNC_CLASS, 544 .class = SONY_NC_CLASS,
545 .ids = ACPI_SNC_HID, 545 .ids = SONY_NC_HID,
546 .ops = { 546 .ops = {
547 .add = sony_acpi_add, 547 .add = sony_nc_add,
548 .remove = sony_acpi_remove, 548 .remove = sony_nc_remove,
549 .resume = sony_acpi_resume, 549 .resume = sony_nc_resume,
550 }, 550 },
551}; 551};
552 552
553static int __init sony_acpi_init(void) 553static int __init sony_laptop_init(void)
554{ 554{
555 return acpi_bus_register_driver(&sony_acpi_driver); 555 return acpi_bus_register_driver(&sony_nc_driver);
556} 556}
557 557
558static void __exit sony_acpi_exit(void) 558static void __exit sony_laptop_exit(void)
559{ 559{
560 acpi_bus_unregister_driver(&sony_acpi_driver); 560 acpi_bus_unregister_driver(&sony_nc_driver);
561} 561}
562 562
563module_init(sony_acpi_init); 563module_init(sony_laptop_init);
564module_exit(sony_acpi_exit); 564module_exit(sony_laptop_exit);