const struct fsl_soc_data *soc_data;
const struct of_device_id *match;
struct ccsr_guts __iomem *regs;
- const char *machine = NULL;
struct device_node *np;
bool little_endian;
u64 soc_uid = 0;
if (!soc_dev_attr)
return -ENOMEM;
- if (of_property_read_string(of_root, "model", &machine))
- of_property_read_string_index(of_root, "compatible", 0, &machine);
- if (machine) {
- soc_dev_attr->machine = kstrdup(machine, GFP_KERNEL);
- if (!soc_dev_attr->machine)
- goto err_nomem;
- }
+ ret = soc_attr_read_machine(soc_dev_attr);
+ if (ret)
+ of_machine_read_compatible(&soc_dev_attr->machine, 0);
soc_die = fsl_soc_die_match(svr, fsl_soc_die);
if (soc_die) {
err_nomem:
ret = -ENOMEM;
err:
- kfree(soc_dev_attr->machine);
kfree(soc_dev_attr->family);
kfree(soc_dev_attr->soc_id);
kfree(soc_dev_attr->revision);