net: fsl_enetc: Introduce enetc_dev_id()
authorMarek Vasut <marex@denx.de>
Thu, 16 Jan 2025 04:03:23 +0000 (05:03 +0100)
committerFabio Estevam <festevam@gmail.com>
Mon, 20 Jan 2025 11:40:39 +0000 (08:40 -0300)
commit4eb5ef73a9565a78dd2a18d0ff4576701bedf872
treea80ba22621743f9feb881f247212c865b2801c6c
parente091e49afe0c47f5884928f42dd29c980478d3e7
net: fsl_enetc: Introduce enetc_dev_id()

Introduce mapping function enetc_dev_id(), which converts PCIe BDF of
the ENETC into linear incrementing index usable e.g. as interface index.
This replaces the current ad-hoc calculation used in the code with a
dedicated function. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
drivers/net/fsl_enetc.c