Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp153923lqc; Thu, 29 Feb 2024 13:08:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWUpp5MdzyZIS7QLAD8HBy6RaBP4e7nP2rz5l3sbtiDV5mI38guD1kSo7UihH+BGwb1O7VoE+3b8vTqLCs/R210YFXjVoad47obtjeR4g== X-Google-Smtp-Source: AGHT+IF7bWG307h1Roam9vtaS0Idet2xOWlc+GItErI4+9vt8vCZARA/yGVTU8/o758lXn+urpDp X-Received: by 2002:ac8:7ca:0:b0:42e:b8d1:2b2a with SMTP id m10-20020ac807ca000000b0042eb8d12b2amr2960548qth.48.1709240886830; Thu, 29 Feb 2024 13:08:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709240886; cv=pass; d=google.com; s=arc-20160816; b=T8M855HjYswvG17wSBg0G2xelEnaUxJ0fDb7HrWbz++O4oBy+VqN7aKhscEy5XAddi sH5d8dydObjZbByaEW9dGCeDAkLZFfYRI/kmBWQmNBvnfqwakQ7ac8DvBxPjCmVeUkvm grptMI9ISvwzlJ+YAZG5emZBlLHemuJDWqikzIfwjkk5mLMT+h/1wftWBke7aAP/Kpo2 WESx20fHHKVNRJAYxaMzFUIKKSXQ4D+KSfY3daQeBAJ68/fcYYdDwXpkVbPau6U5nLd6 /lgBoQD1XRb/o064xqjreJLArklE4+Wuz2iOyQd7DFi+jiZBDrlX0u+G2/n4iELcxb21 hgXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5D+lwpw4B4CqzaxbOzMn85Ig/zR5F9N9xKtP1WaY0I4=; fh=6HNQmV0K/siJD6dSqxHxxZID9X2/vwWvZiEnq0l/Gr0=; b=hTDJC2vxpV+kA5s0ztlhenAbnBE4n7+/BXebkKoFLkPwVkDPDLBKQwOl91c0/OG93K 8psi3boxSTI5m6ilY2bzzAAKhaee+swMZvGdC/RC8bort7xy7G2lf9zlqUlCMALAnfT+ 5FHIaE5WFGMHt3LMPnN2ULMZpgvYUQUL4AR65Wx/Ghrv8TMQKm02I0iXlAYAVVKHDIAs wU8XI0jHnClf4i5PhwgG/eaam5zbrOqVOV081nJzAgyrm67+iosSllI592MMz8RdJ1EF NmHSdvO71y5ODPYBVlgkJs4WFh+52xBq6flazD5QUSIlDiRiDinpbU6hsfoEeAqhR/jN /uUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p5XNv89M; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-87541-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87541-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s3-20020ac85cc3000000b0042eb97f8ba7si2289723qta.220.2024.02.29.13.08.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 13:08:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87541-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p5XNv89M; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-87541-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87541-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8DB2C1C2366B for ; Thu, 29 Feb 2024 21:08:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCCC81527AF; Thu, 29 Feb 2024 20:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p5XNv89M" Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (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 607A6145675 for ; Thu, 29 Feb 2024 20:56:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709240169; cv=none; b=BGoe+x0N6AtciOC5exkRk8unl7MlinQGF42nfgLgNkGzlyZcNdFq8lV0ZlPgq/w+WUE/ERB1FeQ8L3dmk5tykJHeH5y/K1Azi6IevmrRkR6fSFVJt6RQcRQ7fwnmQfXFB5q5rM0D7EsGzdBAMPvYQhdIHNZfd6dsHN73oyS/bx0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709240169; c=relaxed/simple; bh=Am0NKmlCwgLy7Njo99K+o5i4CrEnaQkPIJSAd0GcvZg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hqDaCv+kUmxWSuxa0lPyzmzXWEXwDpvPw5AwP01hVjatQdR4BvCVvtCAkX0ZEgFv/vCGPWJ5uQHiIYtVm8f/y90Q7yuFL0FsVCXNhFlKJ02mzApn7nBVeUcgenYkfKVtWl9xrrUJ5tYK2ZupOb1Mx8JKKmXYOsq21uy7VVPJ1Js= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=p5XNv89M; arc=none smtp.client-ip=209.85.166.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-364f791a428so7239975ab.3 for ; Thu, 29 Feb 2024 12:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709240165; x=1709844965; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5D+lwpw4B4CqzaxbOzMn85Ig/zR5F9N9xKtP1WaY0I4=; b=p5XNv89Mx3GinPIQt7BOa5mzCvf/PZDTGIBL5xIWL8fCGRJ5YGPK1rvoFth/QbJ3gD zGPZRSN+xiGDhiGCUotcbnxzs0fqH4qgxgjOY4aO8nfH5HYSTDuUTwC/apU1QoVcy4CC rCMJa2gYWvL6XKKCItvU8a2kB5rfioMzBb9zjs+3jXspSAyXnU8sy7de2jDM94OfkA11 a56iRAYvu0c69qRfZRgWIwDLaPKi/d4lFPrI9pDkFW3fjMujDqjBajQzBUEx4lLFc9fL kcK5EOSHHr5WxKm7qUgiHg0lFjniHUtBe9bbPNxdN6eep7LCssmU1YYl1c+PzrNU8cv3 pp0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709240165; x=1709844965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5D+lwpw4B4CqzaxbOzMn85Ig/zR5F9N9xKtP1WaY0I4=; b=G10WbXZHcBib8+Ts7GCLgCxLBWScy+7t1qZazMHSusMkfztMZbkyPGSO0vLBDrQVXQ vmxMUNtk1xIMypLwH8MAgk1rRI6mVhC+sNkrH29uyvAQ8sBG4XKPVnGaavfl6fyLvP6n X4oeuSQbq2CmJV0VlyVp1vGsXfVHepqC9nYp74OUoweakQ8kvM38HCn5TbeeX2bZLhUp RI4CPKX0c0psny50+svLKN9uWL28SQo41UdiUzPftI8ytAQHuhJVSXft0zOlWI2tBFeZ K4uMvIrq4w9Nbj9fQqtMOsuQ8y3lbG9nmiTWlZ/dW9Xp5ulMF4oNg17yOVHCtlhp5sgV ABiw== X-Forwarded-Encrypted: i=1; AJvYcCXzm2stm0WNSJ/5dpxwd7KXqhuXbHuqtGaHlLDfA3ReSU/Z6hFnUAaYAeeJEwaMohbMPF0oAvfYKHfeovi9l8K/tPhMBb5meYlzZsFn X-Gm-Message-State: AOJu0Yweo4sNZ+lNlnMpBIPynRZMJK9UsgflwmxxNs3Jn644XNhnE6HC X0uYaEq4ZX7YIUjCTmc1Z4S816Jc1VpxWfAiVidDDcnDDesF9kXvXniciONK8jE= X-Received: by 2002:a05:6e02:b29:b0:365:4e45:658f with SMTP id e9-20020a056e020b2900b003654e45658fmr193247ilu.22.1709240165712; Thu, 29 Feb 2024 12:56:05 -0800 (PST) Received: from localhost.localdomain (c-73-228-159-35.hsd1.mn.comcast.net. [73.228.159.35]) by smtp.gmail.com with ESMTPSA id h14-20020a056e020d4e00b003658fbcf55dsm521551ilj.72.2024.02.29.12.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 12:56:05 -0800 (PST) From: Alex Elder To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: mka@chromium.org, andersson@kernel.org, quic_cpratapa@quicinc.com, quic_avuyyuru@quicinc.com, quic_jponduru@quicinc.com, quic_subashab@quicinc.com, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 5/7] net: ipa: pass a platform device to ipa_smp2p_irq_init() Date: Thu, 29 Feb 2024 14:55:52 -0600 Message-Id: <20240229205554.86762-6-elder@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240229205554.86762-1-elder@linaro.org> References: <20240229205554.86762-1-elder@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Rather than using the platform device pointer field in the IPA pointer, pass a platform device pointer to ipa_smp2p_irq_init(). Use that pointer throughout that function (without assuming it's the same as the IPA platform device pointer). Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_smp2p.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/ipa/ipa_smp2p.c b/drivers/net/ipa/ipa_smp2p.c index 5620dc271fac3..8c4497dfe5afd 100644 --- a/drivers/net/ipa/ipa_smp2p.c +++ b/drivers/net/ipa/ipa_smp2p.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include @@ -179,14 +179,15 @@ static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id) } /* Initialize SMP2P interrupts */ -static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, const char *name, - irq_handler_t handler) +static int ipa_smp2p_irq_init(struct ipa_smp2p *smp2p, + struct platform_device *pdev, + const char *name, irq_handler_t handler) { - struct device *dev = &smp2p->ipa->pdev->dev; + struct device *dev = &pdev->dev; unsigned int irq; int ret; - ret = platform_get_irq_byname(smp2p->ipa->pdev, name); + ret = platform_get_irq_byname(pdev, name); if (ret <= 0) return ret ? : -EINVAL; irq = ret; @@ -261,7 +262,7 @@ int ipa_smp2p_init(struct ipa *ipa, bool modem_init) /* We have enough information saved to handle notifications */ ipa->smp2p = smp2p; - ret = ipa_smp2p_irq_init(smp2p, "ipa-clock-query", + ret = ipa_smp2p_irq_init(smp2p, smp2p->ipa->pdev, "ipa-clock-query", ipa_smp2p_modem_clk_query_isr); if (ret < 0) goto err_null_smp2p; @@ -273,7 +274,8 @@ int ipa_smp2p_init(struct ipa *ipa, bool modem_init) if (modem_init) { /* Result will be non-zero (negative for error) */ - ret = ipa_smp2p_irq_init(smp2p, "ipa-setup-ready", + ret = ipa_smp2p_irq_init(smp2p, smp2p->ipa->pdev, + "ipa-setup-ready", ipa_smp2p_modem_setup_ready_isr); if (ret < 0) goto err_notifier_unregister; -- 2.40.1