Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp205517rdb; Mon, 22 Jan 2024 01:07:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnHor7qmBV7DTagUKqisk0Qidj49MGkjBjTu6ytZEoOg4sd4acxfx5IJjo3pgkYRcVgoq1 X-Received: by 2002:a05:6a20:e68a:b0:19a:fe8a:9d52 with SMTP id mz10-20020a056a20e68a00b0019afe8a9d52mr1347090pzb.99.1705914461319; Mon, 22 Jan 2024 01:07:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705914461; cv=pass; d=google.com; s=arc-20160816; b=uRPa8yFdWNdpcXThfO9Edc/UelyqlBRtjL7AvSHsvsjbW2y88JhNVuIEvAD12oxHDS b4LS/9lwKxeiY9DCwxxU3rbRYO7np6GoXMUQA3EkNp8ARVDTvGWbf+QIWf8YXULzO64t zYvf/CWUIvls5eVyD33YxhL9W1mK4QhbTwtWxLe4d043Tpr30wx4osuBkIBohjhxpJzD TNG87IGCXIC/pN+iyj/AJ0la6BSgRBlxEOyH8UN4xh3PtJd3LRVFjQjvPS1ZWGmzmKWE PfkCi0LQ15RV8pJ4BZ14P+TwT2xfNvZPnprAv3/WrxLYnpAoC5i6il42R+Kw4SdEM4Kn sjOA== 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=eS+j/zxO/A13a5c6hDwTbQxnTMwXkUk6OE1+xwjjNdQ=; fh=y/RjPbXBoPouJTPaYxwEImQW6x8GRiLpamQFwed/jf0=; b=oK16D9QO83KCdtypKzopF2g6G3mGcx67A6y3lToeNCODd9tIyQFtVBtmMUcIdgL8hs b6YFFuC3LOQdVsQPUPcQjI42QlIXQvP7lzzTB6nGub0xRpYoRTvagRe1+TSwXf9W+dfs RJi8nHCPeTYEpazoGfimvSbYG1uzLG1Ra3zJElN4f1kp4ugE9PTzK3VdlH/rK0fWV+2i eg5l1wgO/OI+Ce0Rk3iAhTZ7NLWiIQ2SFtt+paUqrU0drKuOQoHrwYYl0lwle818QDIg ilFHIaxHS8TSMH4rY9puYOPsIhqMhzWy8+MWVNSgJZHDOMvs3WbDsliegtrMShq4NXF1 gApA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=laj4Elr3; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q7-20020a17090a178700b00290191c241bsi7933458pja.19.2024.01.22.01.07.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 01:07:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=laj4Elr3; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-32292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8546A282A1A for ; Mon, 22 Jan 2024 03:03:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1DE755663; Mon, 22 Jan 2024 03:02:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="laj4Elr3" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (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 D82311C2D; Mon, 22 Jan 2024 03:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705892577; cv=none; b=Zm5uAnyJHlMrNADtV7x4o5jy7lIHMw68yXfigQ1ywHPotUPsToPRi6bBtsg30GOyESvIO6KVHNQaf8CbUz9u5Nbv8mpU9iehDoU/2ltyBd9YcTdLKDMO9V59gq6DPplU30ZLzivK8njyHRTpKeEqh7TOWS2pU2uauou66zt6gAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705892577; c=relaxed/simple; bh=UuttBsPusSkviTtBaHGivf1p+uWZkhK/ocLzEpk1Ga8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jIy3IV8LFWEBBZVQMRZ4TBJ5WJV34zP1fZCz0tSxtNwv4kgBQp1O7fml7e3oFDMV6Elsai/29YMfkWHM9gs2Q7MiUwV0TTJ3z8v6xSAr8K3thcNwwMDzrtUcyUoNteYnoEUVHrtnSsuuyeied1zhcqtOQPv0QLyM/gPCDwH5GGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=none smtp.mailfrom=ecsmtp.iind.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=laj4Elr3; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ecsmtp.iind.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705892576; x=1737428576; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UuttBsPusSkviTtBaHGivf1p+uWZkhK/ocLzEpk1Ga8=; b=laj4Elr3fcK/EpsHwn8MzfDzA/el9TQcL0JyECVpqf0KtfSX0081c6k/ g6Z+8iUL5ER7fPAOqNk8AqqMjGlF3Gz4xbDBbMoZ97mrpMTgXZIchFH1i 1RWqk9CNt+mlec+Dyn1gx1ZbBWwEX7MBTyWg5k09o56CjoNEE7W5GmcBQ K6cVzo0854bcT2/lBI+1WfBRbHtOq1qepcPJACKJdF1GGERVw2y7hlpWl QpAMbusTw7OatowXpQRf7LGq5pMz79URRbLIsPhmTsv9ckGMFz/jDVI1a 0zE+KKmJmNqa+oFa99WLsh5fIQ/YM1zzjMtIQiA8eEvlVMmGtHs3ZJWFf g==; X-IronPort-AV: E=McAfee;i="6600,9927,10960"; a="14607325" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="14607325" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2024 19:02:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="1085523" Received: from inesxmail01.iind.intel.com ([10.223.57.40]) by orviesa003.jf.intel.com with ESMTP; 21 Jan 2024 19:02:42 -0800 Received: from inlubt0316.iind.intel.com (inlubt0316.iind.intel.com [10.191.20.213]) by inesxmail01.iind.intel.com (Postfix) with ESMTP id 21851484E; Mon, 22 Jan 2024 08:32:41 +0530 (IST) Received: by inlubt0316.iind.intel.com (Postfix, from userid 12101951) id 1F34B1600100; Mon, 22 Jan 2024 08:32:41 +0530 (IST) From: Raag Jadav To: u.kleine-koenig@pengutronix.de, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, lakshmi.sowjanya.d@intel.com Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Raag Jadav Subject: [PATCH v1 3/3] pwm: dwc: use to_pci_dev() helper Date: Mon, 22 Jan 2024 08:32:38 +0530 Message-Id: <20240122030238.29437-4-raag.jadav@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240122030238.29437-1-raag.jadav@intel.com> References: <20240122030238.29437-1-raag.jadav@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 to_pci_dev() helper to get pci device reference. Signed-off-by: Raag Jadav --- drivers/pwm/pwm-dwc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index 8f8035b047c1..f5fcea4e69e2 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -100,7 +100,7 @@ static void dwc_pwm_remove(struct pci_dev *pci) static int dwc_pwm_suspend(struct device *dev) { - struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); + struct pci_dev *pdev = to_pci_dev(dev); struct dwc_pwm *dwc = pci_get_drvdata(pdev); int i; @@ -120,7 +120,7 @@ static int dwc_pwm_suspend(struct device *dev) static int dwc_pwm_resume(struct device *dev) { - struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); + struct pci_dev *pdev = to_pci_dev(dev); struct dwc_pwm *dwc = pci_get_drvdata(pdev); int i; -- 2.35.3