[PATCH v9 4/4] soc: imx8m: change to use platform driver
Fabio Estevam
festevam at gmail.com
Tue Dec 22 08:25:32 EST 2020
Hi Alice,
On Tue, Dec 22, 2020 at 5:11 AM Alice Guo (OSS) <alice.guo at oss.nxp.com> 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.
More information about the linux-arm-kernel
mailing list