hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/net/phy/phy_device.c
....@@ -505,6 +505,15 @@
505505 INIT_DELAYED_WORK(&dev->state_queue, phy_state_machine);
506506 INIT_WORK(&dev->phy_queue, phy_change_work);
507507
508
+ /* Try to avoid __request_module warning */
509
+#define RK630_PHY_ID 0x00441400
510
+#define PHY_ID_YT8511 0x0000010a
511
+#define PHY_ID_YT8531S 0x4f51e91a
512
+#define PHY_ID_YT8531 0x4f51e91b
513
+ if ((IS_BUILTIN(CONFIG_RK630_PHY) && phy_id == RK630_PHY_ID) ||
514
+ (IS_BUILTIN(CONFIG_MOTORCOMM_PHY) && (phy_id == PHY_ID_YT8511 || phy_id == PHY_ID_YT8531S || phy_id == PHY_ID_YT8531)))
515
+ goto skip_request_module;
516
+
508517 /* Request the appropriate module unconditionally; don't
509518 * bother trying to do so only if it isn't already loaded,
510519 * because that gets complicated. A hotplug event would have
....@@ -517,6 +526,7 @@
517526 */
518527 request_module(MDIO_MODULE_PREFIX MDIO_ID_FMT, MDIO_ID_ARGS(phy_id));
519528
529
+skip_request_module:
520530 device_initialize(&mdiodev->dev);
521531
522532 return dev;