Skip to content

Commit e753741

Browse files
andy-shevGeorgi Djakov
authored andcommitted
interconnect: msm8974: Replace custom implementation of COUNT_ARGS()
Replace custom and non-portable implementation of COUNT_ARGS(). Fixes: 4e60a95 ("interconnect: qcom: add msm8974 driver") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230920154131.2071112-1-andriy.shevchenko@linux.intel.com Signed-off-by: Georgi Djakov <djakov@kernel.org>
1 parent 80f5fef commit e753741

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/interconnect/qcom/msm8974.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*/
2929

3030
#include <dt-bindings/interconnect/qcom,msm8974.h>
31+
32+
#include <linux/args.h>
3133
#include <linux/clk.h>
3234
#include <linux/device.h>
3335
#include <linux/interconnect-provider.h>
@@ -231,7 +233,7 @@ struct msm8974_icc_desc {
231233
.buswidth = _buswidth, \
232234
.mas_rpm_id = _mas_rpm_id, \
233235
.slv_rpm_id = _slv_rpm_id, \
234-
.num_links = ARRAY_SIZE(((int[]){ __VA_ARGS__ })), \
236+
.num_links = COUNT_ARGS(__VA_ARGS__), \
235237
.links = { __VA_ARGS__ }, \
236238
}
237239

0 commit comments

Comments
 (0)