diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-01-06 16:47:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-01-07 04:19:08 -0500 |
commit | d479e908457f4972205fcafa054f8030e91781ef (patch) | |
tree | 1e3bacc19fc158a292807eabcd20012fb674d3ea /drivers/acpi | |
parent | 0aec63e67c69545ca757a73a66f5dcf05fa484bf (diff) |
[ACPI] move some run-time structure inits to compile time
acpi_processor_limit_fops.write was written at run time,
but can be initiailized at compile-time instead.
Similar for acpi_video_bus_POST_fops.write and friends,
but keep doing those at runtime to avoid prototype-hell.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_core.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_perflib.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_thermal.c | 1 | ||||
-rw-r--r-- | drivers/acpi/processor_throttling.c | 1 | ||||
-rw-r--r-- | drivers/acpi/video.c | 8 |
5 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 1278aca96fe3..60e550f1f955 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -357,7 +357,6 @@ static int acpi_processor_add_fs(struct acpi_device *device) | |||
357 | ACPI_PROCESSOR_FILE_THROTTLING)); | 357 | ACPI_PROCESSOR_FILE_THROTTLING)); |
358 | else { | 358 | else { |
359 | entry->proc_fops = &acpi_processor_throttling_fops; | 359 | entry->proc_fops = &acpi_processor_throttling_fops; |
360 | entry->proc_fops->write = acpi_processor_write_throttling; | ||
361 | entry->data = acpi_driver_data(device); | 360 | entry->data = acpi_driver_data(device); |
362 | entry->owner = THIS_MODULE; | 361 | entry->owner = THIS_MODULE; |
363 | } | 362 | } |
@@ -372,7 +371,6 @@ static int acpi_processor_add_fs(struct acpi_device *device) | |||
372 | ACPI_PROCESSOR_FILE_LIMIT)); | 371 | ACPI_PROCESSOR_FILE_LIMIT)); |
373 | else { | 372 | else { |
374 | entry->proc_fops = &acpi_processor_limit_fops; | 373 | entry->proc_fops = &acpi_processor_limit_fops; |
375 | entry->proc_fops->write = acpi_processor_write_limit; | ||
376 | entry->data = acpi_driver_data(device); | 374 | entry->data = acpi_driver_data(device); |
377 | entry->owner = THIS_MODULE; | 375 | entry->owner = THIS_MODULE; |
378 | } | 376 | } |
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 22c7bb66c200..0c0234e18261 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -520,8 +520,8 @@ static void acpi_cpufreq_add_file(struct acpi_processor *pr) | |||
520 | "Unable to create '%s' fs entry\n", | 520 | "Unable to create '%s' fs entry\n", |
521 | ACPI_PROCESSOR_FILE_PERFORMANCE)); | 521 | ACPI_PROCESSOR_FILE_PERFORMANCE)); |
522 | else { | 522 | else { |
523 | acpi_processor_perf_fops.write = acpi_processor_write_performance; | ||
523 | entry->proc_fops = &acpi_processor_perf_fops; | 524 | entry->proc_fops = &acpi_processor_perf_fops; |
524 | entry->proc_fops->write = acpi_processor_write_performance; | ||
525 | entry->data = acpi_driver_data(device); | 525 | entry->data = acpi_driver_data(device); |
526 | entry->owner = THIS_MODULE; | 526 | entry->owner = THIS_MODULE; |
527 | } | 527 | } |
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index dc9817cfb882..22fc9e28a58d 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
@@ -394,6 +394,7 @@ ssize_t acpi_processor_write_limit(struct file * file, | |||
394 | struct file_operations acpi_processor_limit_fops = { | 394 | struct file_operations acpi_processor_limit_fops = { |
395 | .open = acpi_processor_limit_open_fs, | 395 | .open = acpi_processor_limit_open_fs, |
396 | .read = seq_read, | 396 | .read = seq_read, |
397 | .write = acpi_processor_write_limit, | ||
397 | .llseek = seq_lseek, | 398 | .llseek = seq_lseek, |
398 | .release = single_release, | 399 | .release = single_release, |
399 | }; | 400 | }; |
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 74a52d4e79ae..5cd056abfcfb 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -337,6 +337,7 @@ ssize_t acpi_processor_write_throttling(struct file * file, | |||
337 | struct file_operations acpi_processor_throttling_fops = { | 337 | struct file_operations acpi_processor_throttling_fops = { |
338 | .open = acpi_processor_throttling_open_fs, | 338 | .open = acpi_processor_throttling_open_fs, |
339 | .read = seq_read, | 339 | .read = seq_read, |
340 | .write = acpi_processor_write_throttling, | ||
340 | .llseek = seq_lseek, | 341 | .llseek = seq_lseek, |
341 | .release = single_release, | 342 | .release = single_release, |
342 | }; | 343 | }; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index d10668f14699..bd4887518373 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -920,8 +920,8 @@ static int acpi_video_device_add_fs(struct acpi_device *device) | |||
920 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 920 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
921 | "Unable to create 'state' fs entry\n")); | 921 | "Unable to create 'state' fs entry\n")); |
922 | else { | 922 | else { |
923 | acpi_video_device_state_fops.write = acpi_video_device_write_state; | ||
923 | entry->proc_fops = &acpi_video_device_state_fops; | 924 | entry->proc_fops = &acpi_video_device_state_fops; |
924 | entry->proc_fops->write = acpi_video_device_write_state; | ||
925 | entry->data = acpi_driver_data(device); | 925 | entry->data = acpi_driver_data(device); |
926 | entry->owner = THIS_MODULE; | 926 | entry->owner = THIS_MODULE; |
927 | } | 927 | } |
@@ -934,8 +934,8 @@ static int acpi_video_device_add_fs(struct acpi_device *device) | |||
934 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 934 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
935 | "Unable to create 'brightness' fs entry\n")); | 935 | "Unable to create 'brightness' fs entry\n")); |
936 | else { | 936 | else { |
937 | acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; | ||
937 | entry->proc_fops = &acpi_video_device_brightness_fops; | 938 | entry->proc_fops = &acpi_video_device_brightness_fops; |
938 | entry->proc_fops->write = acpi_video_device_write_brightness; | ||
939 | entry->data = acpi_driver_data(device); | 939 | entry->data = acpi_driver_data(device); |
940 | entry->owner = THIS_MODULE; | 940 | entry->owner = THIS_MODULE; |
941 | } | 941 | } |
@@ -1239,8 +1239,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1239 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1239 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
1240 | "Unable to create 'POST' fs entry\n")); | 1240 | "Unable to create 'POST' fs entry\n")); |
1241 | else { | 1241 | else { |
1242 | acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; | ||
1242 | entry->proc_fops = &acpi_video_bus_POST_fops; | 1243 | entry->proc_fops = &acpi_video_bus_POST_fops; |
1243 | entry->proc_fops->write = acpi_video_bus_write_POST; | ||
1244 | entry->data = acpi_driver_data(device); | 1244 | entry->data = acpi_driver_data(device); |
1245 | entry->owner = THIS_MODULE; | 1245 | entry->owner = THIS_MODULE; |
1246 | } | 1246 | } |
@@ -1253,8 +1253,8 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1253 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1253 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
1254 | "Unable to create 'DOS' fs entry\n")); | 1254 | "Unable to create 'DOS' fs entry\n")); |
1255 | else { | 1255 | else { |
1256 | acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; | ||
1256 | entry->proc_fops = &acpi_video_bus_DOS_fops; | 1257 | entry->proc_fops = &acpi_video_bus_DOS_fops; |
1257 | entry->proc_fops->write = acpi_video_bus_write_DOS; | ||
1258 | entry->data = acpi_driver_data(device); | 1258 | entry->data = acpi_driver_data(device); |
1259 | entry->owner = THIS_MODULE; | 1259 | entry->owner = THIS_MODULE; |
1260 | } | 1260 | } |