@@ -1523,7 +1523,6 @@ static void fe_pending_work(struct work_struct *work)
static int fe_probe(struct platform_device *pdev)
{
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- const struct of_device_id *match;
struct fe_soc_data *soc;
struct net_device *netdev;
struct fe_priv *priv;
@@ -1532,8 +1531,7 @@ static int fe_probe(struct platform_device *pdev)
device_reset(&pdev->dev);
- match = of_match_device(of_fe_match, &pdev->dev);
- soc = (struct fe_soc_data *)match->data;
+ soc = of_device_get_match_data(&pdev->dev);
if (soc->reg_table)
fe_reg_table = soc->reg_table;
Slight cleanup and avoids a temporary variable. Based on upstream commit. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- .../files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)