phy: core: make phy_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Tue, 5 Mar 2024 18:18:51 +0000 (15:18 -0300)
committerVinod Koul <vkoul@kernel.org>
Sat, 6 Apr 2024 06:23:32 +0000 (11:53 +0530)
commitdb704bf6dccc8fef77ee4a8326bf2013b828205b
treec9069bc47ebd2d020408b9a3c0423a914fccf1e5
parent5cee04a8369049b92d52995e320abff18dfeda44
phy: core: make phy_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the phy_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Link: https://lore.kernel.org/r/20240305-class_cleanup-phy-v1-1-106013a644dc@marliere.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/phy-core.c