Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2434753rdb; Mon, 12 Feb 2024 05:03:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXlHxSEFxI+IJRFjgQRApQZLj5eFMqbf2rSukiiS7BHmXrCJT6N+J/GgDf+2cobCsuMGK0Nsah6W3blwmgQbnOWvAKwdhmfgvUqMshJfA== X-Google-Smtp-Source: AGHT+IEgcip+0R8zbIVyZWIfptnEMuFPK72XrbxhHsg4EdvEnFJRuXFIStGWn/OINvLQBFbfAJSz X-Received: by 2002:a17:903:24d:b0:1d9:e11d:e3c6 with SMTP id j13-20020a170903024d00b001d9e11de3c6mr5966027plh.64.1707743003964; Mon, 12 Feb 2024 05:03:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707743003; cv=pass; d=google.com; s=arc-20160816; b=IWAWo+EcVaRXQwHxyEJaarEv2EjPcvzAmByp1U2g3ZNhjiEtCO3L18T4NDm4WLl38W y2C3L8m+RpgP69Hf1YGNM/FXhCuY22r0LNS97j2qjNupV8Y1rTc3CouBpasef3kvWyBB NcsA57cmNdgNdHi1ihnybVJfOSzlr5Y8IjFrxHMjqo1S9XR/FE4J9Xb3EEzI1Wq3F8Xz PdlP4wX33wGvZ5w5LLiAO/wgyQei/F/0G+zXE9awviIHWX4/DE/B/6HaTwaKLfdHolQe riZy2Axi4H1F8Im4SP+QnML4Pn9HB9OI4LzucQnGqBJhIpjMBiMnfmI0okDX91SxRfcO 8mUQ== 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=Z4ecoytGA1aNn3qu4tlj6Uvzdb4dF6Nt7TwXOJ84ncY=; fh=sy9MzdtLoGpli2HFW8ir16akPJX4LPPW2MG3KgKRpiM=; b=DP5WW6CI6djuDs0dU13RNk5sx76tpGibI/NpsSAtr/lxkXw2ojF3f1CHoVo7LZcFwG nPNjjViZGcBzhIl2/1PFzKLJuKVw5+qRhInyeaodD6cGspJNubHBxJlgA3XffqNfUdjk q1hUQJi9fW4b7QM6TLCfxciAng9/+FdBMJNX0L2y58xI8Acmi9/UQZS4Nw1VpR8RGeHa Z3i1EjQAu825KFeLmrq5aRrLQgNVOEjht8Jg4TWJf3Pk3aLNTBXzaLqUVANMstSsvEId e6sfsVAYAiM+5YjH1i5BAH6qc6JAkg/FTLqTAc09NzXhQAn9aKDqlGrR+6rIydQGTqRo humA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=klqEjlbh; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61592-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCX+FGvrCmNGo3wOxRKEIgHCD8OTjwc2WodDj431aRfSPtWgFo/eRqlI2z3cWB6dMGKnvmv0TGZTzQNkLgQTxkDk9kI98XPl6O6xAFirXA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a17-20020a170902ecd100b001d9176f56f7si220704plh.462.2024.02.12.05.03.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 05:03:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61592-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=klqEjlbh; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-61592-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61592-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 34102283D3E for ; Mon, 12 Feb 2024 13:03:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 598913A8E5; Mon, 12 Feb 2024 13:02:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="klqEjlbh" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 E03323A28B; Mon, 12 Feb 2024 13:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707742976; cv=none; b=jzAvhBHdzFDx/OqWC5DK7U1QF4tMIiCmJltiLJUd9yYIG1OefP+s+33dRv8EmV1EFcLxGnb3mLCqBBcZPdT0qYUPt2QIiZakBWSG5MAM0pDaNxwggPmb61wrTNYuSkU5qVqvT98G1kdDh4QDG19q/+pqmcbXWFhzvh3fgizpckM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707742976; c=relaxed/simple; bh=uje6c8I2tiqtfUYQ+9jgDQlGSSLDu0ZZYftu8pHhS3M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JNIW3EJALMYPLiOZMBk8FS8SVybJpI0VFnYkcJLQFS5JsQ17fk2a3bAvhigQnyNAQ7ZKDl4pXXxgyBxgUY8ABnk/+IIJM5gieZHhnap+9a/+ZmmcrbupjD2Gu50XwgcjfKT7FsJwDw6+6tle2DchhZ5cDFO9fQMBFWKxBKkjQiw= 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=klqEjlbh; arc=none smtp.client-ip=192.198.163.17 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=1707742975; x=1739278975; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uje6c8I2tiqtfUYQ+9jgDQlGSSLDu0ZZYftu8pHhS3M=; b=klqEjlbhGogFUcn0Ao2WhRGI1+6gA6qDJaPBUUfYKTYLG9yXDPJ+ZiBG NTt2RBvWZH1R85I5nL36AcQFSbqcPpaS4bNaV6jcgNTDfn2lZQqKSU3bx Fa72xmPrbWREqwiM9CfG8xiXtRgkd61V6gZcD3tEgaTaLe2HiOqis43nE Hfqgz740ig0Vnh4XQV1fqsDrf/T6mXEH3KKqS7AVTwQuhnJ6gQGubsLTH YBwYu+rTdFl0Q3HmKiWlR4uBYvT36dX0Z0ICa7YDokHN52B0MAOT+FWZo CoT3T+u0XtLWyZVVf3oSYD1/5PTsuuDICgTt5Gfkx9h8d2qEYpM8kV9V6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10981"; a="1594832" X-IronPort-AV: E=Sophos;i="6.06,263,1705392000"; d="scan'208";a="1594832" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2024 05:02:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,263,1705392000"; d="scan'208";a="33378387" Received: from inesxmail01.iind.intel.com ([10.223.57.40]) by orviesa002.jf.intel.com with ESMTP; 12 Feb 2024 05:02:50 -0800 Received: from inlubt0316.iind.intel.com (inlubt0316.iind.intel.com [10.191.20.213]) by inesxmail01.iind.intel.com (Postfix) with ESMTP id 59E3D1CAD1; Mon, 12 Feb 2024 18:32:49 +0530 (IST) Received: by inlubt0316.iind.intel.com (Postfix, from userid 12101951) id 56F421600105; Mon, 12 Feb 2024 18:32:49 +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 v3 5/5] pwm: dwc: access driver_data using dev_get_drvdata() Date: Mon, 12 Feb 2024 18:32:47 +0530 Message-Id: <20240212130247.9985-6-raag.jadav@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240212130247.9985-1-raag.jadav@intel.com> References: <20240212130247.9985-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 Now that we're setting driver_data using dev_set_drvdata(), we can use dev_get_drvdata() for accessing it. Signed-off-by: Raag Jadav Reviewed-by: Andy Shevchenko --- drivers/pwm/pwm-dwc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c index 56fac8655c7b..ed56b796b670 100644 --- a/drivers/pwm/pwm-dwc.c +++ b/drivers/pwm/pwm-dwc.c @@ -82,8 +82,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 dwc_pwm *dwc = pci_get_drvdata(pdev); + struct dwc_pwm *dwc = dev_get_drvdata(dev); int i; for (i = 0; i < DWC_TIMERS_TOTAL; i++) { @@ -102,8 +101,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 dwc_pwm *dwc = pci_get_drvdata(pdev); + struct dwc_pwm *dwc = dev_get_drvdata(dev); int i; for (i = 0; i < DWC_TIMERS_TOTAL; i++) { -- 2.35.3