soc: renesas: Use bitfield helpers

Use the field_get() helper, instead of open-coding the same operation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
This commit is contained in:
Geert Uytterhoeven
2025-11-06 14:34:14 +01:00
committed by Yury Norov (NVIDIA)
parent 3937b05bb7
commit c604cb5fdf

View File

@@ -5,6 +5,7 @@
* Copyright (C) 2014-2016 Glider bvba
*/
#include <linux/bitfield.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
@@ -524,8 +525,7 @@ static int __init renesas_soc_init(void)
eshi, eslo);
}
if (soc->id &&
((product & id->mask) >> __ffs(id->mask)) != soc->id) {
if (soc->id && field_get(id->mask, product) != soc->id) {
pr_warn("SoC mismatch (product = 0x%x)\n", product);
ret = -ENODEV;
goto free_soc_dev_attr;