}
 }
 
-static const struct cs35l41_otp_packed_element_t otp_map_1[CS35L41_NUM_OTP_ELEM] = {
+static const struct cs35l41_otp_packed_element_t otp_map_1[] = {
        /* addr         shift   size */
        { 0x00002030,   0,      4 }, /*TRIM_OSC_FREQ_TRIM*/
        { 0x00002030,   7,      1 }, /*TRIM_OSC_TRIM_DONE*/
        { 0x00017044,   0,      24 }, /*LOT_NUMBER*/
 };
 
-static const struct cs35l41_otp_packed_element_t otp_map_2[CS35L41_NUM_OTP_ELEM] = {
+static const struct cs35l41_otp_packed_element_t otp_map_2[] = {
        /* addr         shift   size */
        { 0x00002030,   0,      4 }, /*TRIM_OSC_FREQ_TRIM*/
        { 0x00002030,   7,      1 }, /*TRIM_OSC_TRIM_DONE*/
        {
                .id = 0x01,
                .map = otp_map_1,
-               .num_elements = CS35L41_NUM_OTP_ELEM,
+               .num_elements = ARRAY_SIZE(otp_map_1),
                .bit_offset = 16,
                .word_offset = 2,
        },
        {
                .id = 0x02,
                .map = otp_map_2,
-               .num_elements = CS35L41_NUM_OTP_ELEM,
+               .num_elements = ARRAY_SIZE(otp_map_2),
                .bit_offset = 16,
                .word_offset = 2,
        },
        {
                .id = 0x03,
                .map = otp_map_2,
-               .num_elements = CS35L41_NUM_OTP_ELEM,
+               .num_elements = ARRAY_SIZE(otp_map_2),
                .bit_offset = 16,
                .word_offset = 2,
        },
        {
                .id = 0x06,
                .map = otp_map_2,
-               .num_elements = CS35L41_NUM_OTP_ELEM,
+               .num_elements = ARRAY_SIZE(otp_map_2),
                .bit_offset = 16,
                .word_offset = 2,
        },
        {
                .id = 0x08,
                .map = otp_map_1,
-               .num_elements = CS35L41_NUM_OTP_ELEM,
+               .num_elements = ARRAY_SIZE(otp_map_1),
                .bit_offset = 16,
                .word_offset = 2,
        },