/* Returns -1 when the DMI table can't be reached, 0 on success.  */
int dmi_walk(void(*decode)(const struct dmi_header *, void *), void *private_data)
/* Returns -1 when the DMI table can't be reached, 0 on success.  */
int dmi_walk(void(*decode)(const struct dmi_header *, void *), void *private_data)
{
	u8 *buf;
	if (!dmi_available)
		return -1;
	buf = ioremap(dmi_base, dmi_len);
	if (buf == NULL)
		return -1;
	dmi_table(buf, dmi_len, dmi_num, decode, private_data);
	iounmap(buf);
	return 0;
}