diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 |
| commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
| tree | 2624a44924c625c367f3cebf937853b9da2de282 /drivers/acpi/debug.c | |
| parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
| parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'drivers/acpi/debug.c')
| -rw-r--r-- | drivers/acpi/debug.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c index 263322b7d113..35c6af8a83cd 100644 --- a/drivers/acpi/debug.c +++ b/drivers/acpi/debug.c | |||
| @@ -155,13 +155,12 @@ acpi_system_write_debug(struct file *file, | |||
| 155 | { | 155 | { |
| 156 | char debug_string[12] = { '\0' }; | 156 | char debug_string[12] = { '\0' }; |
| 157 | 157 | ||
| 158 | ACPI_FUNCTION_TRACE("acpi_system_write_debug"); | ||
| 159 | 158 | ||
| 160 | if (count > sizeof(debug_string) - 1) | 159 | if (count > sizeof(debug_string) - 1) |
| 161 | return_VALUE(-EINVAL); | 160 | return -EINVAL; |
| 162 | 161 | ||
| 163 | if (copy_from_user(debug_string, buffer, count)) | 162 | if (copy_from_user(debug_string, buffer, count)) |
| 164 | return_VALUE(-EFAULT); | 163 | return -EFAULT; |
| 165 | 164 | ||
| 166 | debug_string[count] = '\0'; | 165 | debug_string[count] = '\0'; |
| 167 | 166 | ||
| @@ -173,10 +172,10 @@ acpi_system_write_debug(struct file *file, | |||
| 173 | acpi_dbg_level = simple_strtoul(debug_string, NULL, 0); | 172 | acpi_dbg_level = simple_strtoul(debug_string, NULL, 0); |
| 174 | break; | 173 | break; |
| 175 | default: | 174 | default: |
| 176 | return_VALUE(-EINVAL); | 175 | return -EINVAL; |
| 177 | } | 176 | } |
| 178 | 177 | ||
| 179 | return_VALUE(count); | 178 | return count; |
| 180 | } | 179 | } |
| 181 | 180 | ||
| 182 | static int __init acpi_debug_init(void) | 181 | static int __init acpi_debug_init(void) |
| @@ -185,10 +184,9 @@ static int __init acpi_debug_init(void) | |||
| 185 | int error = 0; | 184 | int error = 0; |
| 186 | char *name; | 185 | char *name; |
| 187 | 186 | ||
| 188 | ACPI_FUNCTION_TRACE("acpi_debug_init"); | ||
| 189 | 187 | ||
| 190 | if (acpi_disabled) | 188 | if (acpi_disabled) |
| 191 | return_VALUE(0); | 189 | return 0; |
| 192 | 190 | ||
| 193 | /* 'debug_layer' [R/W] */ | 191 | /* 'debug_layer' [R/W] */ |
| 194 | name = ACPI_SYSTEM_FILE_DEBUG_LAYER; | 192 | name = ACPI_SYSTEM_FILE_DEBUG_LAYER; |
| @@ -213,15 +211,12 @@ static int __init acpi_debug_init(void) | |||
| 213 | goto Error; | 211 | goto Error; |
| 214 | 212 | ||
| 215 | Done: | 213 | Done: |
| 216 | return_VALUE(error); | 214 | return error; |
| 217 | 215 | ||
| 218 | Error: | 216 | Error: |
| 219 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
| 220 | "Unable to create '%s' proc fs entry\n", name)); | ||
| 221 | |||
| 222 | remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir); | 217 | remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir); |
| 223 | remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir); | 218 | remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir); |
| 224 | error = -EFAULT; | 219 | error = -ENODEV; |
| 225 | goto Done; | 220 | goto Done; |
| 226 | } | 221 | } |
| 227 | 222 | ||
