]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: macb: Clean up the .init settings in macb_config instances
authorKevin Hao <haokexin@gmail.com>
Tue, 10 Mar 2026 10:12:08 +0000 (18:12 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Mar 2026 02:00:33 +0000 (19:00 -0700)
commit9179711ee2f70f3ba1d56d5c2e9fce04fb754198
tree8e30ef2ecb4c6ffe27788ce4895d9ee84768deaa
parentf97977944d1587fc01736da8b138d7bb9c526d02
net: macb: Clean up the .init settings in macb_config instances

All instances of macb_config currently have the .init field set, but most
of them use macb_init(). In fact, there is no need to duplicate this
across all macb_config instances. Introduce a new macb_init() function
that executes the specific .init if it is set; otherwise, it runs a
default initialization function.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Link: https://patch.msgid.link/20260310-macb-cleanup-v1-2-928c1a91a7dc@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c