SmartAudio/lichee/linux-4.9/drivers/char/oases/offsets.c

28 lines
491 B
C
Executable File

#include <asm/asm-offsets.h>
#include <linux/kernel.h>
#include <linux/string.h>
struct oases_offset {
const char *name;
int value;
};
static const struct oases_offset s_asm_offsets[] = {
#if defined(__aarch64__)
{ .name = "S_PC", .value = S_PC, },
#endif
};
int oases_offsets_get_asm(const char *name)
{
int i;
for (i = 0; i < sizeof(s_asm_offsets) / sizeof(s_asm_offsets[0]); i++) {
if (!strcmp(s_asm_offsets[i].name, name))
return s_asm_offsets[i].value;
}
return -1;
}