Skip to content

Commit 80f5fef

Browse files
andy-shevGeorgi Djakov
authored andcommitted
interconnect: imx: Replace custom implementation of COUNT_ARGS()
Replace custom and non-portable implementation of COUNT_ARGS(). Fixes: f0d8048 ("interconnect: Add imx core driver") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230920153432.2067664-1-andriy.shevchenko@linux.intel.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
1 parent 0bb80ec commit 80f5fef

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/interconnect/imx

drivers/interconnect/imx/imx.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#ifndef __DRIVERS_INTERCONNECT_IMX_H
1111
#define __DRIVERS_INTERCONNECT_IMX_H
1212

13+
#include <linux/args.h>
1314
#include <linux/interconnect-provider.h>
1415
#include <linux/kernel.h>
1516

@@ -89,7 +90,7 @@ struct imx_icc_noc_setting {
8990
.id = _id, \
9091
.name = _name, \
9192
.adj = _adj, \
92-
.num_links = ARRAY_SIZE(((int[]){ __VA_ARGS__ })), \
93+
.num_links = COUNT_ARGS(__VA_ARGS__), \
9394
.links = { __VA_ARGS__ }, \
9495
}
9596

0 commit comments

Comments
 (0)