Skip to content

Commit 0f8407a

Browse files
geertuYuryNorov
authored andcommitted
clk: at91: Convert to common field_{get,prep}() helpers
Drop the driver-specific field_get() and field_prep() macros, in favor of the globally available variants from <linux/bitfield.h>. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: Claudiu Beznea <claudiu.beznea@tuxon.dev> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
1 parent c1c6ab8 commit 0f8407a

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/clk/at91/clk-peripheral.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (C) 2013 Boris BREZILLON <b.brezillon@overkiz.com>
44
*/
55

6+
#include <linux/bitfield.h>
67
#include <linux/bitops.h>
78
#include <linux/clk-provider.h>
89
#include <linux/clkdev.h>

drivers/clk/at91/pmc.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ struct at91_clk_pms {
117117
unsigned int parent;
118118
};
119119

120-
#undef field_get
121-
#define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
122-
#undef field_prep
123-
#define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
124-
125120
#define ndck(a, s) (a[s - 1].id + 1)
126121
#define nck(a) (a[ARRAY_SIZE(a) - 1].id + 1)
127122

0 commit comments

Comments
 (0)