Re: [PATCH v3 2/2] soc: ti: add k3 platforms chipid module driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 8, 2020 at 12:01 PM Grygorii Strashko
<grygorii.strashko@xxxxxx> wrote:

> +static int __init k3_chipinfo_init(void)
> +{
> +       struct soc_device_attribute *soc_dev_attr;
> +       struct soc_device *soc_dev;
> +       struct device_node *node;
> +       struct regmap *regmap;
> +       u32 partno_id;
> +       u32 variant;
> +       u32 jtag_id;
> +       u32 mfg;
> +       int ret;
> +
> +       node = of_find_compatible_node(NULL, NULL, "ti,am654-chipid");
> +       if (!node)
> +               return -ENODEV;

This will fail the initcall and print a warning when the kernel runs on any
other SoC. Would it be possible to just make this a platform_driver?

If not, I think you should silently return success when the device
node is absent.

       Arnd



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux