Message ID | 20240212130247.9985-6-raag.jadav@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-61592-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2487396dyd; Mon, 12 Feb 2024 07:10:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUcGE3BoMxDxY+r71Egu3LY2A2r4xwAekRrERZd9o+I5mwjm31PYUL/MW8Cf/o6E62s+bQ3SDiBz943Y6UdsLUkyrve2w== X-Google-Smtp-Source: AGHT+IGntCw7JT5adDiL6NTa3xvcWShFuDztkI1IhOEdATaYnizWlxuhOc4AhVGuWHmAN2fLHEFW X-Received: by 2002:a17:902:db02:b0:1da:25a9:ba12 with SMTP id m2-20020a170902db0200b001da25a9ba12mr6199053plx.28.1707750605429; Mon, 12 Feb 2024 07:10:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707750605; cv=pass; d=google.com; s=arc-20160816; b=bygazlHgbpJRUEjUJCMFlo1UUQ9RRNgxABWy4RKVGYlFdwZDI3Apm277dkFoCmzxLN b6kqp8VKa57h8iX5oJRB3KnenWVzUvXb72vpIyralh4IiydVKqkaWrKHIkmxfM7IhXwK EyqwIPXQaNfsdugUpbguWWMfBRb52/0TLt6t66AZYyIgolUiUVdkonTzx5MXV5Ev43Co 872kBNkbrYA3UeDu+5xLwHE/GLyW1iLb7YQ5uvN2fBpc/844XMi3NNrlKF2YzliCobIA IzjaBrfI2/zkvXly8R1P/8GE5AqeRPU6ktTRYlQ8K1uT/uCceg8QqNvG86IPG0QV2Ogf 6jSg== 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=XpoiJyWx/DwXxE6r9DA0AWJ4LjzZ1bPAdwp9Szh9DgI=; b=N1LkYBFTiTujc1bQJENRDkUjPtEeHoP7F7JCs9MD9jlWskH8VfhFvrWiOUf49OTvPg 1We8t+c7E8W3k20BB1WTiazhHpHAzbaDgOKOClxJgomTlhwrMhpUoXz1DdKBrmqm74Pi 1F/E25ggDPVX9IRnURZtbC2pPDQdxMHllkzHMlse+w7L908oJAUIbo+XpKEF9ORMxK/k LQMHKHLQr8CCNHLHsuDuaLyDAZf3PeXH8TGvkB4Nkf4fxnyJSs3CUfMhvLl3vuj6bLQi 9XJuwWe8qItIIgKJXhpBX0esPnbzzQkQowi6c4uIUcPK2AmaiYqXgz+3l4JXX2hYynmt rP0Q==; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61592-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCUPFnvs9AilN61uwZTMcArmiSs7HDP4aEonHucH5OD/lTl0veVUz7sceIs/hWhMXoDHvyscum5ZQO6RHiRyiXfiX6Vqjg== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d13-20020a170903230d00b001db28b0c06asi354102plh.329.2024.02.12.07.10.04 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 07:10:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61592-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61592-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C69FCB21AD1 for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 13:03:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 35FE83B1AB; Mon, 12 Feb 2024 13: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="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 <raag.jadav@intel.com> 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 <raag.jadav@intel.com> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790706299070882927 X-GMAIL-MSGID: 1790706299070882927 |
Series |
DesignWare PWM improvements
|
|
Commit Message
Raag Jadav
Feb. 12, 2024, 1:02 p.m. UTC
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 <raag.jadav@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- 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++) {