mirror of
https://github.com/torvalds/linux.git
synced 2026-10-15 20:30:02 +02:00
phy: phy-can-transceiver: Move OF ID table closer to their user
There is no code that uses ID table directly, except the struct device_driver at the end of the file. Hence, move table closer to its user. It's always possible to access them via a pointer. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260513220336.369628-4-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
23db9fd578
commit
62455f6be1
|
|
@ -97,35 +97,6 @@ static const struct can_transceiver_data tja1057_drvdata = {
|
|||
.flags = CAN_TRANSCEIVER_SILENT_PRESENT,
|
||||
};
|
||||
|
||||
static const struct of_device_id can_transceiver_phy_ids[] = {
|
||||
{
|
||||
.compatible = "ti,tcan1042",
|
||||
.data = &tcan1042_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "ti,tcan1043",
|
||||
.data = &tcan1043_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tja1048",
|
||||
.data = &tja1048_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tja1051",
|
||||
.data = &tja1051_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tja1057",
|
||||
.data = &tja1057_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tjr1443",
|
||||
.data = &tcan1043_drvdata
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, can_transceiver_phy_ids);
|
||||
|
||||
static struct phy *can_transceiver_phy_xlate(struct device *dev,
|
||||
const struct of_phandle_args *args)
|
||||
{
|
||||
|
|
@ -232,6 +203,35 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
|
|||
return PTR_ERR_OR_ZERO(phy_provider);
|
||||
}
|
||||
|
||||
static const struct of_device_id can_transceiver_phy_ids[] = {
|
||||
{
|
||||
.compatible = "ti,tcan1042",
|
||||
.data = &tcan1042_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "ti,tcan1043",
|
||||
.data = &tcan1043_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tja1048",
|
||||
.data = &tja1048_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tja1051",
|
||||
.data = &tja1051_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tja1057",
|
||||
.data = &tja1057_drvdata
|
||||
},
|
||||
{
|
||||
.compatible = "nxp,tjr1443",
|
||||
.data = &tcan1043_drvdata
|
||||
},
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, can_transceiver_phy_ids);
|
||||
|
||||
static struct platform_driver can_transceiver_phy_driver = {
|
||||
.probe = can_transceiver_phy_probe,
|
||||
.driver = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user