summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/superiotool/superiotool.c2
-rw-r--r--util/superiotool/superiotool.h9
2 files changed, 5 insertions, 6 deletions
diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c
index c70aff947c..5ee383ce34 100644
--- a/util/superiotool/superiotool.c
+++ b/util/superiotool/superiotool.c
@@ -80,7 +80,7 @@ static void dump_regs(const struct superio_registers reg_table[],
int i, int j, uint16_t port)
{
int k;
- const int *idx;
+ const int16_t *idx;
if (reg_table[i].ldn[j].ldn != NOLDN) {
printf("LDN 0x%02x", reg_table[i].ldn[j].ldn);
diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h
index 26851484c1..bbab1fb67f 100644
--- a/util/superiotool/superiotool.h
+++ b/util/superiotool/superiotool.h
@@ -51,7 +51,6 @@ and print its vendor, name, ID, revision, and config port.\n"
#define NANA -3 /* Not Available */
#define RSVD -4 /* Reserved */
#define MISC -5 /* Needs special comment in output */
-#define MAXNAMELEN 30 /* Maximum Name Length */
#define MAXLDN 0x10 /* Biggest LDN */
#define LDNSIZE (MAXLDN + 3) /* Biggest LDN + 0 + NOLDN + EOT */
#define MAXNUMIDX 70 /* Maximum number of indexes */
@@ -65,12 +64,12 @@ extern int chip_found;
struct superio_registers {
int32_t superio_id; /* Signed, as we need EOT. */
- const char name[MAXNAMELEN]; /* Super I/O name */
+ const char *name; /* Super I/O name */
struct {
- int ldn;
+ int8_t ldn;
const char *name; /* LDN name */
- int idx[IDXSIZE];
- int def[IDXSIZE];
+ int16_t idx[IDXSIZE];
+ int16_t def[IDXSIZE];
} ldn[LDNSIZE];
};