From patchwork Mon Jan 22 03:02:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 189941 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp2420631dyb; Sun, 21 Jan 2024 23:51:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOglm0iQmeijDL4BQqb1bjNArFL9FGVaYCxDtspoDinmfv6xuANe4KCQD3yvKnRsKGGnNp X-Received: by 2002:a17:906:66da:b0:a2c:1b17:d267 with SMTP id k26-20020a17090666da00b00a2c1b17d267mr1874077ejp.148.1705909884836; Sun, 21 Jan 2024 23:51:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705909884; cv=pass; d=google.com; s=arc-20160816; b=HH/bdTiB2lKHqkK78iwX5Il/s5xA5tGkZrmih93m4M6xsXT6/racxGKINveVjHMHK6 OaT+fz2Z7aXP6kjMyVpe6ltK8rkSRvdVMB2P+q4VKJ/CPJy6N2UUVdDsS2pvD2OyRItc 6Cq7CQP2p6S39Gq/8QOz8kWi6FlC42+x7Crsx8JBOic2sNSfDYXv30ekwZp/M1iwdMrU HVLTt6vuoO5DXUtYS0ffpKv4abX3oe8c9fpJTMpGpGnh3ZLHz9X8rKh151yHJNG4+/5A h/xIxnnhrOqu+ZMfl2b0BDFlllr0UJAJOY76iK26uwBE/qQz5ZkeHebI3/AGElzHQuAS UskQ== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32292-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g23-20020a170906595700b00a305c712805si525644ejr.762.2024.01.21.23.51.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jan 2024 23:51:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32292-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32292-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7B45F1F232CB for ; Mon, 22 Jan 2024 03:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E56716AA7; Mon, 22 Jan 2024 03:02:59 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788776163122093522 X-GMAIL-MSGID: 1788776163122093522 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;