diff options
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 63 |
1 files changed, 57 insertions, 6 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 006b31a56559..109c3f8ae7df 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1042,12 +1042,12 @@ void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) | |||
1042 | * | 1042 | * |
1043 | * FUNCTION: acpi_os_create_cache | 1043 | * FUNCTION: acpi_os_create_cache |
1044 | * | 1044 | * |
1045 | * PARAMETERS: CacheName - Ascii name for the cache | 1045 | * PARAMETERS: name - Ascii name for the cache |
1046 | * ObjectSize - Size of each cached object | 1046 | * size - Size of each cached object |
1047 | * MaxDepth - Maximum depth of the cache (in objects) | 1047 | * depth - Maximum depth of the cache (in objects) <ignored> |
1048 | * ReturnCache - Where the new cache object is returned | 1048 | * cache - Where the new cache object is returned |
1049 | * | 1049 | * |
1050 | * RETURN: Status | 1050 | * RETURN: status |
1051 | * | 1051 | * |
1052 | * DESCRIPTION: Create a cache object | 1052 | * DESCRIPTION: Create a cache object |
1053 | * | 1053 | * |
@@ -1057,7 +1057,10 @@ acpi_status | |||
1057 | acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) | 1057 | acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache) |
1058 | { | 1058 | { |
1059 | *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL); | 1059 | *cache = kmem_cache_create(name, size, 0, 0, NULL, NULL); |
1060 | return AE_OK; | 1060 | if (cache == NULL) |
1061 | return AE_ERROR; | ||
1062 | else | ||
1063 | return AE_OK; | ||
1061 | } | 1064 | } |
1062 | 1065 | ||
1063 | /******************************************************************************* | 1066 | /******************************************************************************* |
@@ -1137,4 +1140,52 @@ void *acpi_os_acquire_object(acpi_cache_t * cache) | |||
1137 | return object; | 1140 | return object; |
1138 | } | 1141 | } |
1139 | 1142 | ||
1143 | /****************************************************************************** | ||
1144 | * | ||
1145 | * FUNCTION: acpi_os_validate_interface | ||
1146 | * | ||
1147 | * PARAMETERS: interface - Requested interface to be validated | ||
1148 | * | ||
1149 | * RETURN: AE_OK if interface is supported, AE_SUPPORT otherwise | ||
1150 | * | ||
1151 | * DESCRIPTION: Match an interface string to the interfaces supported by the | ||
1152 | * host. Strings originate from an AML call to the _OSI method. | ||
1153 | * | ||
1154 | *****************************************************************************/ | ||
1155 | |||
1156 | acpi_status | ||
1157 | acpi_os_validate_interface (char *interface) | ||
1158 | { | ||
1159 | |||
1160 | return AE_SUPPORT; | ||
1161 | } | ||
1162 | |||
1163 | |||
1164 | /****************************************************************************** | ||
1165 | * | ||
1166 | * FUNCTION: acpi_os_validate_address | ||
1167 | * | ||
1168 | * PARAMETERS: space_id - ACPI space ID | ||
1169 | * address - Physical address | ||
1170 | * length - Address length | ||
1171 | * | ||
1172 | * RETURN: AE_OK if address/length is valid for the space_id. Otherwise, | ||
1173 | * should return AE_AML_ILLEGAL_ADDRESS. | ||
1174 | * | ||
1175 | * DESCRIPTION: Validate a system address via the host OS. Used to validate | ||
1176 | * the addresses accessed by AML operation regions. | ||
1177 | * | ||
1178 | *****************************************************************************/ | ||
1179 | |||
1180 | acpi_status | ||
1181 | acpi_os_validate_address ( | ||
1182 | u8 space_id, | ||
1183 | acpi_physical_address address, | ||
1184 | acpi_size length) | ||
1185 | { | ||
1186 | |||
1187 | return AE_OK; | ||
1188 | } | ||
1189 | |||
1190 | |||
1140 | #endif | 1191 | #endif |