diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-11-06 14:34:14 +0100 |
|---|---|---|
| committer | Yury Norov (NVIDIA) <yury.norov@gmail.com> | 2025-11-24 14:15:47 -0500 |
| commit | c604cb5fdf0f569a9ce344a37a79958c3841396e (patch) | |
| tree | 3d3657309f4bb009ec88a9814dea95a5c9c05caf | |
| parent | 3937b05bb78f3ad1e8887b91b9a97ea05ac0a4a8 (diff) | |
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>
| -rw-r--r-- | drivers/soc/renesas/renesas-soc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/soc/renesas/renesas-soc.c b/drivers/soc/renesas/renesas-soc.c index 1eb52356b996..ee4f17bb4db4 100644 --- a/drivers/soc/renesas/renesas-soc.c +++ b/drivers/soc/renesas/renesas-soc.c @@ -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; |
