summaryrefslogtreecommitdiff
path: root/scripts/objdiff
diff options
context:
space:
mode:
authorDavid Lechner <[email protected]>2026-01-07 09:50:15 -0600
committerTom Rini <[email protected]>2026-01-12 13:14:02 -0600
commitb1358915728b9c38c0d8c4ef11a3a6f5ab5687bb (patch)
tree193a7977facec66a8acbe68598a912af4473983c /scripts/objdiff
parent159825bdd5ec63cd443c855adeceb3adf29e4655 (diff)
clk: mediatek: add of_xlate ops
Add driver-specific of_xlate ops for MediaTek clocks. This provides better checking of the args passed from the devicetree. Compared to the default of_xlate implementation, this will return -EINVAL if there are zero args (id is always required) and -ENOENT if the id is out of range for the clock type. This will protect against out of bounds array accesses later on when the clk->id is used to index into the clock data arrays. If there is a id_offs_map, then we have to do that translation first before checking the id to see if it is in range. There is no sense in doing the mapping multiple times, so we save the mapped ID in clk->id and remove mtk_clk_get_id(). mtk_clk_find_parent_rate() also had to be updated since it creates a temporary struct clk to represent the parent clock. It now has do the translation in case the parent clock also uses an id_offs_map. Signed-off-by: David Lechner <[email protected]>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions