From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7052F3CAA3B; Wed, 13 May 2026 22:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778709826; cv=none; b=SIlwg35n2yPfXYL3dQTNyiVQ9fXtVAF5YytlSHMjzoqMu3bwhlnu5kbkHBxMcuLbD5i2VbtgNAiTvoU+SpeuHtlIoU7lLxWPet0GqbZsoFsoF3LVgEbaCbtP/Tbr4drODJJP9uBbXMLAQ2hw6C4qScoOPcWrDdBbQoKB4zk64qM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778709826; c=relaxed/simple; bh=Puy6ngsQY/0YjfmDOaDKNp63+djPMuQx42KTX9C5XYQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MLwZ5uV8GITce17IvYHmAjbF1s3ENGCZWkV7NyFNequeP7rWPHr85cHI/Bmy/WRrHvAj1UXKKy22n1aBeQBtaxrBeOrUm8aTPuODz0/O4620BqkN9hqv3feNDZ7lE5Y/4V5+3omjkOlQ6CUu4dC8lXvRGNuYmnSTv+unmqH84Zg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IZ8CUHHy; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IZ8CUHHy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778709825; x=1810245825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Puy6ngsQY/0YjfmDOaDKNp63+djPMuQx42KTX9C5XYQ=; b=IZ8CUHHyhF7+t0of/sJjhHNQBXDdsg6K3IsNSAVvb7tzODdr6UV6sqz4 FqXXj9eEpGV57MZo31gNOzDNl11+RJcQ2+IEYntz+DR4MUFfGkd0J77/v eY2FDJlcbG38AOKvPanpxDC6jhZSfRrucdS7IwzYpVvqRClbwFtB4LQ2/ DPt6wJkt106PmJo2bbjzhCxhnqwJOkH4KDd7L3AgBqoXg0mQIcStKvgrf WLkarq24rT8pkz2dT+rzaZXYTHB6T8t/TptIe+Oap8WFC1+hiDRtpI14l 0suDN4YkzZNCVw18w2/hJbr/CTgIb5JgrmNn7AwpyV+QBLspOTppJ0AjL g==; X-CSE-ConnectionGUID: wNJk7GFrTnKr9zlLBqZXAA== X-CSE-MsgGUID: ywsNs1ibQOa4+JCKOaQ/vg== X-IronPort-AV: E=McAfee;i="6800,10657,11785"; a="79600728" X-IronPort-AV: E=Sophos;i="6.23,233,1770624000"; d="scan'208";a="79600728" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2026 15:03:42 -0700 X-CSE-ConnectionGUID: JdczoZvNT8m5WKbYV/pxhA== X-CSE-MsgGUID: 1HVDaJswTnqYRRsiQsh7sg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,233,1770624000"; d="scan'208";a="238447028" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa007.jf.intel.com with ESMTP; 13 May 2026 15:03:39 -0700 Received: by black.igk.intel.com (Postfix, from userid 1003) id 9834299; Thu, 14 May 2026 00:03:38 +0200 (CEST) From: Andy Shevchenko To: Peng Fan , linux-can@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Marc Kleine-Budde , Vincent Mailhol , Vinod Koul , Neil Armstrong , Josua Mayer , Ulf Hansson , Andy Shevchenko Subject: [PATCH v5 2/6] phy: phy-can-transceiver: use device_get_match_data() Date: Thu, 14 May 2026 00:01:27 +0200 Message-ID: <20260513220336.369628-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260513220336.369628-1-andriy.shevchenko@linux.intel.com> References: <20260513220336.369628-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use the generic firmware node interface for retrieving device match data instead of the OF-specific one. While at it, drop unneeded argument to devm_phy_create() which extracts device node from the given device by default. Reviewed-by: Josua Mayer Signed-off-by: Andy Shevchenko --- drivers/phy/phy-can-transceiver.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c index 1808f903c057..37b706d841ff 100644 --- a/drivers/phy/phy-can-transceiver.c +++ b/drivers/phy/phy-can-transceiver.c @@ -5,9 +5,9 @@ * Copyright (C) 2021 Texas Instruments Incorporated - https://www.ti.com * */ -#include #include #include +#include #include #include #include @@ -152,7 +152,6 @@ static int can_transceiver_phy_probe(struct platform_device *pdev) struct can_transceiver_phy *can_transceiver_phy; struct can_transceiver_priv *priv; const struct can_transceiver_data *drvdata; - const struct of_device_id *match; struct phy *phy; struct gpio_desc *silent_gpio; struct gpio_desc *standby_gpio; @@ -161,11 +160,10 @@ static int can_transceiver_phy_probe(struct platform_device *pdev) u32 max_bitrate = 0; int err, i, num_ch = 1; - match = of_match_node(can_transceiver_phy_ids, pdev->dev.of_node); - if (!match || !match->data) + drvdata = device_get_match_data(dev); + if (!drvdata) return -ENODEV; - drvdata = match->data; if (drvdata->flags & CAN_TRANSCEIVER_DUAL_CH) num_ch = 2; @@ -190,7 +188,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev) can_transceiver_phy = &priv->can_transceiver_phy[i]; can_transceiver_phy->priv = priv; - phy = devm_phy_create(dev, dev->of_node, &can_transceiver_phy_ops); + phy = devm_phy_create(dev, NULL, &can_transceiver_phy_ops); if (IS_ERR(phy)) { dev_err(dev, "failed to create can transceiver phy\n"); return PTR_ERR(phy); -- 2.50.1