Re: [PATCH v9 4/4] soc: imx8m: change to use platform driver

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

 



Hi Alice,

On Tue, Dec 22, 2020 at 5:11 AM Alice Guo (OSS) <alice.guo@xxxxxxxxxxx> wrote:

> -       soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
> -       soc_uid <<= 32;
> -       soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
> +       if (dev) {
> +               int ret = 0;

No need to initialize ret to 0.

> -       imx8mm_soc_uid();
> +       if (dev) {
> +               int ret = 0;

Ditto.


> +/* Retain device_initcall is for backward compatibility with DTS. */
> +static int __init imx8_soc_init(void)
> +{
> +       int ret = 0;

Ditto.

> +
> +       if (of_find_matching_node_and_match(NULL, imx8_soc_match, NULL))
> +               return 0;
> +
> +       ret = imx8_soc_info(NULL);
> +       return ret;

Or you could even get rid of 'ret' and return imx8_soc_info() directly.



[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