Skip to content

Conversation

@mhennerich
Copy link
Contributor

PR Description

Namespace utility functions to avoid symbol conflicts

Rename the adi_api_utils_* functions to ad916x_api_utils_* to avoid symbol conflicts with the apollo driver which defines the same function names.

The following symbols are renamed:

  • adi_api_utils_gcd -> ad916x_api_utils_gcd
  • adi_api_utils_mult_64 -> ad916x_api_utils_mult_64
  • adi_api_utils_lshift_128 -> ad916x_api_utils_lshift_128
  • adi_api_utils_rshift_128 -> ad916x_api_utils_rshift_128
  • adi_api_utils_mult_128 -> ad916x_api_utils_mult_128
  • adi_api_utils_div_128 -> ad916x_api_utils_div_128
  • adi_api_utils_add_128 -> ad916x_api_utils_add_128
  • adi_api_utils_subt_128 -> ad916x_api_utils_subt_128
  • is_power_of_two -> ad916x_is_power_of_two
  • U64MSB -> AD916X_U64MSB

This fixes linker errors when both ad916x and apollo drivers are built into the kernel:

multiple definition of adi_api_utils_gcd' multiple definition of adi_api_utils_mult_64'
...

Fixes: e592f1c ("drivers/iio/frequency/cf_axi_dds: Add support for AD9162")

…onflicts

Rename the adi_api_utils_* functions to ad916x_api_utils_* to avoid
symbol conflicts with the apollo driver which defines the same
function names.

The following symbols are renamed:
  - adi_api_utils_gcd -> ad916x_api_utils_gcd
  - adi_api_utils_mult_64 -> ad916x_api_utils_mult_64
  - adi_api_utils_lshift_128 -> ad916x_api_utils_lshift_128
  - adi_api_utils_rshift_128 -> ad916x_api_utils_rshift_128
  - adi_api_utils_mult_128 -> ad916x_api_utils_mult_128
  - adi_api_utils_div_128 -> ad916x_api_utils_div_128
  - adi_api_utils_add_128 -> ad916x_api_utils_add_128
  - adi_api_utils_subt_128 -> ad916x_api_utils_subt_128
  - is_power_of_two -> ad916x_is_power_of_two
  - U64MSB -> AD916X_U64MSB

This fixes linker errors when both ad916x and apollo drivers are
built into the kernel:

  multiple definition of `adi_api_utils_gcd'
  multiple definition of `adi_api_utils_mult_64'
  ...

Fixes: e592f1c ("drivers/iio/frequency/cf_axi_dds: Add support for AD9162")

Signed-off-by: Michael Hennerich <[email protected]>
@mhennerich mhennerich merged commit c72cc33 into main Dec 19, 2025
29 checks passed
@mhennerich mhennerich deleted the staging/xlnx/ad916x-dev branch December 19, 2025 13:48
github-actions bot pushed a commit that referenced this pull request Dec 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants