Commit 29af6344 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven
Browse files

pinctrl: renesas: Simplify multiplication/shift logic

parent 31231092
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -132,9 +132,8 @@ struct pinmux_cfg_reg {
	.reg = r, .reg_width = r_width,					\
	.reg = r, .reg_width = r_width,					\
	.field_width = f_width + BUILD_BUG_ON_ZERO(r_width % f_width) +	\
	.field_width = f_width + BUILD_BUG_ON_ZERO(r_width % f_width) +	\
	BUILD_BUG_ON_ZERO(sizeof((const u16 []) { ids }) / sizeof(u16) != \
	BUILD_BUG_ON_ZERO(sizeof((const u16 []) { ids }) / sizeof(u16) != \
			  (r_width / f_width) * (1 << f_width)),	\
			  (r_width / f_width) << f_width),		\
	.enum_ids = (const u16 [(r_width / f_width) * (1 << f_width)])	\
	.enum_ids = (const u16 [(r_width / f_width) << f_width]) { ids }
		{ ids }


/*
/*
 * Describe a config register consisting of several fields of different widths
 * Describe a config register consisting of several fields of different widths