mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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:
committed by
Yury Norov (NVIDIA)
parent
3937b05bb7
commit
c604cb5fdf
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user