.. | .. |
---|
505 | 505 | INIT_DELAYED_WORK(&dev->state_queue, phy_state_machine); |
---|
506 | 506 | INIT_WORK(&dev->phy_queue, phy_change_work); |
---|
507 | 507 | |
---|
| 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 | + |
---|
508 | 517 | /* Request the appropriate module unconditionally; don't |
---|
509 | 518 | * bother trying to do so only if it isn't already loaded, |
---|
510 | 519 | * because that gets complicated. A hotplug event would have |
---|
.. | .. |
---|
517 | 526 | */ |
---|
518 | 527 | request_module(MDIO_MODULE_PREFIX MDIO_ID_FMT, MDIO_ID_ARGS(phy_id)); |
---|
519 | 528 | |
---|
| 529 | +skip_request_module: |
---|
520 | 530 | device_initialize(&mdiodev->dev); |
---|
521 | 531 | |
---|
522 | 532 | return dev; |
---|