From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7886B3890FC for ; Mon, 3 Aug 2026 23:18:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785799107; cv=none; b=Spb5HNQzB+bG9KuU5oKBnit61XSWtFKvLfEEtkwMNZVdTUtfYog4Lsu6/IrPgXjW/RO4sk/MOV9+gBV898NMHKJj69opqnVwQL9k0F5pooOYpVqYpacBJlocr6k8uZ3H3/zLO7NGZCmvmPuci6+8vKD3lBsbnADpe3W70XtVps4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785799107; c=relaxed/simple; bh=1Bi8dYj6PJP8SCx08LdhS5uel3E7MINzk2ww5QBKnvE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a/KIWTqm/VoT4LnehLmm7L5yrsXgkjtll1bHpL/B8MYy5p4VOSsc4NenAst5JJqkxitFMycZdSG6aPahXsZF3ofggziPVzLHRkQ/ah0roke1c0NJhMXRcZaN4lNz6iir/okYymUdWuNE29RrXi3ZOjUeAZimhcRD110xL5+OQ2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Alt4LJ4d; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Alt4LJ4d" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2cedda2ce6fso33046135ad.1 for ; Mon, 03 Aug 2026 16:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785799106; x=1786403906; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=pNy0UkHqJf4wD9Q7SUQtnbzuWP3YB4RBFtxq12jMuKE=; b=Alt4LJ4d/i4F9QpBO595DuyYKeFdCwLeSTfu2PVBbo0E4PweRUsdIVqtPCA64E9KcB a0wTUkk9Rj0udOjcDhXbbHSxw+wlgGd2jEJsXij8Y0WmEIUG3dZofvFw8tHcuPhDxKJB O55i+pftJspwbIAE6bmnu+s18l7iWFL4cA07i7lx1Ray4/Rml8MWpm7IVXWMt+75ViLW fr3JjnPHQUw27VbY4++cwoFsYkYaCC3GLh7Y13M7tT9bIAa1x7CLFf11hlpvux7didoC 9W3cPPuftaZrN2C280yA8kII2FTaNDTVu5i75b+Q9y+O+PqS12AJDr2xLaSxLLCPR2xR rM8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785799106; x=1786403906; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=pNy0UkHqJf4wD9Q7SUQtnbzuWP3YB4RBFtxq12jMuKE=; b=J1zlu8/MHjEpSz7dk97CuXwE6MUZXdz1XRsm68dIHTTD/mi21bt2yLybRqm8s2+rNw dAbeZUCz+2YoWkAhrFB8XMLTRS2WtJp6IasPB91rCqwHKAJLYSHWe0gKQvmbJnMKyJvh j0BFBBEh8sprfCZom2yiE/Xm7PGXOPC3oErgzxA6k8NmzIJaLgrY0qyyXPEU0bGgbHOH A8KAF3URyoKwLxuFWWqRKAhcrDrnIfJOFtK/sKfbI5zEBb8M2dyyl29PJ/VwIlAUmcHn AnjaXasDn93NSbYLwqjxkpz8oKwcynTTfLeHEkRet+GmjEYdExDAVpTPEVfomVybsSHV cDXw== X-Forwarded-Encrypted: i=1; AHgh+Rqju4ETgyjIHtfgFogX5mQpP8YBhufiSgevXhBmid/ZkHAOoUtuWQq1AHJmkdhdHQgG+T+pjRvgCkOGu1U=@vger.kernel.org X-Gm-Message-State: AOJu0Yzs/AoLoTqxKtvgxi/NYGVfOyT9V52oip9JVmqa+zIWuVFUI5sE T+UcfhAWVz8PPbw8yQwM7h/GJMppBBMrxNjzt8wLNxhx7lylVloNYvjAXoRjTA== X-Gm-Gg: AR+sD11gDn4YF354J6UKLFdQtQj2uPPB9mflgimYjKH986kLHmpilycX5oDwNyY9J6j uNUKAEJ/hLCKKv1jpbZu4fIymyI+o08t6OfwRMVWmi+o7gk3dtra9HN95ENeRgXCjZx3ZoRof0W tEhvIQ3mkwqllxEiOIiWZa16bX9/rMgXOkaQgs3Wx+kCbmwLXVTM8Wkas4CH4MdYrMHG6wuXCUh AQ/QvzZTHLWy7via4WpV4Vre7vzA0FGTZlexshy/4HFDmRG5Gt33sFSCQV0PqJsvYQ2NpQaO+vY WO+5lG6f91oAC5udM5m72uhw/xYWWnaR7cmpQi5upxEhbImwnNyATQrDLkNROj6SC+5ofYHpcEC 3xTDtJxnEloMKnqH4okZAPfwrkrl8G2wt49AWmzVljsafZH8mrwtF5WgQGPg4iLmOW7cGr0yADD OtsMbOhJYO8+QyNWsv6DAcsIZWhGsxpU2JvU4AqPM/uc6UrpPRaHyU+7MZ5Y4cbtNtxY+X9o4Aa sn5fj5SL1UQrIc4LQ0Hzu5stEf4lUaM1IxuxE9hNhkzOsxufIWSxLR3mzewJdIoB/W5Ye+eoxpT jh86m5hciqAnaWwM6YMqWOribpHaO3xjZCO+vw== X-Received: by 2002:a17:903:37ce:b0:2ca:1479:d9dc with SMTP id d9443c01a7336-2d05221d3bbmr113140515ad.12.1785799105666; Mon, 03 Aug 2026 16:18:25 -0700 (PDT) Received: from ryzen.lan ([2601:644:8000:7a86::e35]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d04aea0f8asm43349705ad.35.2026.08.03.16.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 16:18:24 -0700 (PDT) From: Rosen Penev To: linux-sound@vger.kernel.org Cc: Vincenzo Frascino , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Michal Simek , linux-arm-kernel@lists.infradead.org (moderated list:ARM/ZYNQ ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] ASoC: xilinx: replace OF with device handlers Date: Mon, 3 Aug 2026 16:18:23 -0700 Message-ID: <20260803231823.95147-1-rosenp@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit All of these usages of OF handlers use the node from the platform_device. Use the device member to simplify slightly. Signed-off-by: Rosen Penev --- sound/soc/xilinx/xlnx_formatter_pcm.c | 2 -- sound/soc/xilinx/xlnx_i2s.c | 12 +++++------- sound/soc/xilinx/xlnx_spdif.c | 8 +++----- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c index 8f7a76758535..55b5b473d85f 100644 --- a/sound/soc/xilinx/xlnx_formatter_pcm.c +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include #include diff --git a/sound/soc/xilinx/xlnx_i2s.c b/sound/soc/xilinx/xlnx_i2s.c index 0676da122edd..273258125497 100644 --- a/sound/soc/xilinx/xlnx_i2s.c +++ b/sound/soc/xilinx/xlnx_i2s.c @@ -9,9 +9,8 @@ #include #include -#include -#include #include +#include #include #include @@ -174,7 +173,6 @@ static int xlnx_i2s_probe(struct platform_device *pdev) int ret; u32 format; struct device *dev = &pdev->dev; - struct device_node *node = dev->of_node; drv_data = devm_kzalloc(&pdev->dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) @@ -184,13 +182,13 @@ static int xlnx_i2s_probe(struct platform_device *pdev) if (IS_ERR(drv_data->base)) return PTR_ERR(drv_data->base); - ret = of_property_read_u32(node, "xlnx,num-channels", &drv_data->channels); + ret = device_property_read_u32(dev, "xlnx,num-channels", &drv_data->channels); if (ret < 0) return dev_err_probe(dev, ret, "cannot get supported channels\n"); drv_data->channels *= 2; - ret = of_property_read_u32(node, "xlnx,dwidth", &drv_data->data_width); + ret = device_property_read_u32(dev, "xlnx,dwidth", &drv_data->data_width); if (ret < 0) return dev_err_probe(dev, ret, "cannot get data width\n"); @@ -205,7 +203,7 @@ static int xlnx_i2s_probe(struct platform_device *pdev) return -EINVAL; } - if (of_device_is_compatible(node, "xlnx,i2s-transmitter-1.0")) { + if (device_is_compatible(dev, "xlnx,i2s-transmitter-1.0")) { drv_data->dai_drv.name = "xlnx_i2s_playback"; drv_data->dai_drv.playback.stream_name = "Playback"; drv_data->dai_drv.playback.formats = format; @@ -213,7 +211,7 @@ static int xlnx_i2s_probe(struct platform_device *pdev) drv_data->dai_drv.playback.channels_max = drv_data->channels; drv_data->dai_drv.playback.rates = SNDRV_PCM_RATE_8000_192000; drv_data->dai_drv.ops = &xlnx_i2s_dai_ops; - } else if (of_device_is_compatible(node, "xlnx,i2s-receiver-1.0")) { + } else if (device_is_compatible(dev, "xlnx,i2s-receiver-1.0")) { drv_data->dai_drv.name = "xlnx_i2s_capture"; drv_data->dai_drv.capture.stream_name = "Capture"; drv_data->dai_drv.capture.formats = format; diff --git a/sound/soc/xilinx/xlnx_spdif.c b/sound/soc/xilinx/xlnx_spdif.c index ae05818ba064..a70ca6beb646 100644 --- a/sound/soc/xilinx/xlnx_spdif.c +++ b/sound/soc/xilinx/xlnx_spdif.c @@ -10,8 +10,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -242,7 +241,6 @@ static int xlnx_spdif_probe(struct platform_device *pdev) struct spdif_dev_data *ctx; struct device *dev = &pdev->dev; - struct device_node *node = dev->of_node; ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); if (!ctx) @@ -257,7 +255,7 @@ static int xlnx_spdif_probe(struct platform_device *pdev) if (IS_ERR(ctx->base)) return PTR_ERR(ctx->base); - ret = of_property_read_u32(node, "xlnx,spdif-mode", &ctx->mode); + ret = device_property_read_u32(dev, "xlnx,spdif-mode", &ctx->mode); if (ret < 0) return dev_err_probe(dev, ret, "cannot get SPDIF mode\n"); @@ -278,7 +276,7 @@ static int xlnx_spdif_probe(struct platform_device *pdev) dai_drv = &xlnx_spdif_rx_dai; } - ret = of_property_read_u32(node, "xlnx,aud_clk_i", &ctx->aclk); + ret = device_property_read_u32(dev, "xlnx,aud_clk_i", &ctx->aclk); if (ret < 0) return dev_err_probe(dev, ret, "cannot get aud_clk_i value\n"); -- 2.55.0