Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp301353lqr; Wed, 5 Jun 2024 06:38:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqsSCa3E55f/S3Q87Kxh0EQogR2cVAv3EzDAAsqPaw8DBzs9Q5t5LEsSRsaY2nEtARe1UcpbEeTELdzhscLujQI/Un//JFW9dsraL6AA== X-Google-Smtp-Source: AGHT+IHmn812uMOJq2J2DWMUHW02djVaUHyPsaqp96eQxE/qd2DkU55dmsfKeoZ8efHhyvNnXP9o X-Received: by 2002:a05:620a:4107:b0:793:19a3:6f8b with SMTP id af79cd13be357-79523fcfa23mr328483285a.74.1717594716387; Wed, 05 Jun 2024 06:38:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717594716; cv=pass; d=google.com; s=arc-20160816; b=QmQUjuIp/qclcJRcNeoL5+ToZVzJ1OuAddwxcU0fhzSK4Mkgf+BWIYJ6RMcxkJXVKd Y7DtvKg1om2c+/XQlOgaJSe0hjKfZaubvnHccEc/MYo3Odn1et+SOan5iSV2mnUIaMez E6g+gHWcUy+YB014HJDIbJAXzpPEgQLsGrkO4v9q8H3TMuTmOJbCjjOpB0RPPOlsu8z4 2x6bQpxKuT3eHeoM4L21gObgt6XTGk55RWiwC+afSjLdQ5mKSx60ioqMjZSrVCILLG7P Q9J/pjHfiL/pDgjbLL3FsgnEQ5bIMcccK51XUYoBxIIEjLDNt+y7TkOa98VC0g4DZlTY vSSA== 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=cZmdxBcAZl6c+u3XY6KnXZouiJ1lM27Yr2+Pu2Uj+sk=; fh=f4oQ1NxckOSRXlJpKvipjqjs+zRJ6+ljKRfkZ4azfIc=; b=hvS9yxdDoF80bhnLImmr+xGCLFx8mcHp+cPbtakNYDJ/kkoFTeLZbbRU4pV30hnt3Q JFZJSQ+SM3OE4sOCLsm90yi3DZHhwyjyJM5i5TMjy8KfA2WVZcNYLiW2mg2MTCb20427 ZuNAkpjyNhIhVBcWOJrtxJjczoK3b19RAGccOO0zXWga1ptqE4x4Vr0l24x8+i5zD+p5 3aaP3hYxYYuRIAPckT9ejj4l2IohVzj6ALEgkSvGK4+VjDHqRhCbzmrf+KN4uNCEkcFN V98HIS4OcBKyrJ5QpJU6OnGS6e0yda37M5FBvVLQX672HIDpkY4a20nL7fNuiYZzrDBN FBTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L353sSRX; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-202683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202683-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff23d9a15si127917991cf.215.2024.06.05.06.38.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:38:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L353sSRX; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-202683-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202683-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 2373A1C226F1 for ; Wed, 5 Jun 2024 13:38:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF5B419D8AD; Wed, 5 Jun 2024 13:16:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="L353sSRX" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 83DCF19D887; Wed, 5 Jun 2024 13:16:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717593362; cv=none; b=RdcW3NVBl5dv0iZyjeibGhtVDqoURWEc0SRDJMhcqZj7C/BS1+E4FHr3gNpgiRiH1DxoLnFV1v2CrKSq9QvVKY344KF84p8HmYj2tfZ3rQ+5jnj6G69F3DvGLFtzwJMWhnoX/m1o5zi5AXVRhU/0MfFLGeUkdQSkaQqooer3c+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717593362; c=relaxed/simple; bh=aO0M+GBN/jf5DZcWxP1iiJ1SPiO5YkAL4IsAvtFiOvY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o3GbV2SaS9HFcljf7bKuH7Ozk1ctxcpk37w+4SetQA6fMRBC+jIjKa+yg2wsXdZ4lW7ye6LkKnnx0PPttzcUF8/AhZhku27pZQhogTeUY/OaE0FKSRvlr0EEWCgGhiKMNDri0Ka35bpr+JrtzSfowvULV/R3AG3k0IY9YtbZRjk= 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=L353sSRX; arc=none smtp.client-ip=192.198.163.12 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=1717593361; x=1749129361; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aO0M+GBN/jf5DZcWxP1iiJ1SPiO5YkAL4IsAvtFiOvY=; b=L353sSRXJtULfgwSO50LCm/cMaxsrP5OpJoHpRvPl+Ayjv0dOqlqG9V7 tCQ6moBB4ZTb2lxIq4GH9v1YVEHyeebMmv5cfpFGega2Y3ixZUGrWRoy9 ZsOAsfrb9Uu69/gkvTSYvnBme307eJP4hVe7sjATxoBjTwQos9kbPV0PC Dx9sb4cB6nr/bRys+X7i+Zi0zBcSmsbZ/Ar60hLNJl8JffWgjVYNahwUn 8ZIwZetTRslRs6A0U0hpCT+7jxEKKBHVAZKGNrhGYMp+Umhuw0+pY9hgG xB6cEojS0oKr6S76K8HV3F+zhk5Sbj/Sf8sYfs+J9FG1tKI3wg8kj/hHA w==; X-CSE-ConnectionGUID: IWrUbzPaT8SKLnodQ2LrKw== X-CSE-MsgGUID: jM14v58jQMWCX9tZUiNeVQ== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="18048161" X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="18048161" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 06:15:51 -0700 X-CSE-ConnectionGUID: vyWzxxeSQ0GYiLhx9CkZJQ== X-CSE-MsgGUID: 34chdvglTrucTXpOMbo3LA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,216,1712646000"; d="scan'208";a="42549304" Received: from inesxmail01.iind.intel.com ([10.223.57.40]) by orviesa003.jf.intel.com with ESMTP; 05 Jun 2024 06:15:50 -0700 Received: from inlubt0316.iind.intel.com (inlubt0316.iind.intel.com [10.191.20.213]) by inesxmail01.iind.intel.com (Postfix) with ESMTP id 6573619AFD; Wed, 5 Jun 2024 18:45:48 +0530 (IST) Received: by inlubt0316.iind.intel.com (Postfix, from userid 12101951) id 611D61600108; Wed, 5 Jun 2024 18:45:48 +0530 (IST) From: Raag Jadav To: ukleinek@kernel.org, jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org, Raag Jadav Subject: [PATCH v2 1/2] pwm: lpss: use devm_pm_runtime_enable() helper Date: Wed, 5 Jun 2024 18:45:32 +0530 Message-Id: <20240605131533.20037-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240605131533.20037-1-raag.jadav@intel.com> References: <20240605131533.20037-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 devm_pm_runtime_enable() helper to enable runtime PM and drop redundant platform ->remove() callback. Signed-off-by: Raag Jadav Reviewed-by: Andy Shevchenko --- drivers/pwm/pwm-lpss-platform.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/pwm/pwm-lpss-platform.c b/drivers/pwm/pwm-lpss-platform.c index dbc9f5b17bdc..5130238a4567 100644 --- a/drivers/pwm/pwm-lpss-platform.c +++ b/drivers/pwm/pwm-lpss-platform.c @@ -55,14 +55,7 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev) DPM_FLAG_SMART_SUSPEND); pm_runtime_set_active(&pdev->dev); - pm_runtime_enable(&pdev->dev); - - return 0; -} - -static void pwm_lpss_remove_platform(struct platform_device *pdev) -{ - pm_runtime_disable(&pdev->dev); + return devm_pm_runtime_enable(&pdev->dev); } static const struct acpi_device_id pwm_lpss_acpi_match[] = { @@ -80,7 +73,6 @@ static struct platform_driver pwm_lpss_driver_platform = { .acpi_match_table = pwm_lpss_acpi_match, }, .probe = pwm_lpss_probe_platform, - .remove_new = pwm_lpss_remove_platform, }; module_platform_driver(pwm_lpss_driver_platform); -- 2.35.3