[PATCH 1/2] base: soc: populate machine name in soc_device_register if empty
Martin Blumenstingl
martin.blumenstingl at googlemail.com
Mon Mar 20 08:39:46 PDT 2023
On Fri, Mar 17, 2023 at 1:37 PM Heiner Kallweit <hkallweit1 at gmail.com> wrote:
[...]
> +static void soc_device_get_machine(struct soc_device_attribute *soc_dev_attr)
> +{
> + struct device_node *np;
> +
> + if (soc_dev_attr->machine)
> + return;
> +
> + np = of_find_node_by_path("/");
> + of_property_read_string(np, "model", &soc_dev_attr->machine);
> + of_node_put(np);
At first I thought there's a problem with non-OF machines here.
But if CONFIG_OF is disabled the code above is a no-op because we're
not checking any error/return codes.
So this gets my:
Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
More information about the linux-arm-kernel
mailing list