mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 21:26:14 +01: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:
parent
3937b05bb7
commit
c604cb5fdf
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue