Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp107761lqp; Fri, 12 Apr 2024 11:48:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPbo8yP9OfhEW26IQhE3n6WrnZZ7yev0LFljDJaNu2rYcqx4BH6T8DvlfM3VUSFiefoftp90WDgcHop1IeBgnMJ+KUlDqifEY40myVQA== X-Google-Smtp-Source: AGHT+IEPcSR9fLwxJwLkELhKmsI3+DzfvP6H4niaaXiZvIexz+Uob16Mh7smAnnU9Em01ZYmW+2i X-Received: by 2002:a05:6a21:271d:b0:1a7:a3cb:78f3 with SMTP id rm29-20020a056a21271d00b001a7a3cb78f3mr3271295pzb.12.1712947726140; Fri, 12 Apr 2024 11:48:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712947726; cv=pass; d=google.com; s=arc-20160816; b=Xx2TSpPO5k2OtVT/UK4gtLCIAiMk9E5O0Vujb9A45O4Yp2IiQ5JmtNxkiWploIYiLq TSxm+Qsy01uk1zBlll3k/o2fgkHooG6kUJ8NWyYUWoAHaA7yNEsa4CQjoX4ZOYyw4PR9 PTdO6PpdVslTepepP613caSbgGd31f2ZXLHlHdFO1KFIZ7RUbNfYYWrGl+Hjv2+cuw02 3vw7HUqKgaWoNZXfeb7wyppCs9yNp1dg0HifkJYREDr7VBEobFUybh6vY2UDs86QGcCF TKIBp7oe5lpVQcg8Iz7tiH7D2EGw6zBxWz7ASURJokRDbtwqY3N7LGCVsORJrGZUwb3O X/sA== 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=IOR9Rlsxhb4ufzz5aeEx2odufqk59khDNZeOIT1LqHo=; fh=2yWt0PI0DrDGi9O3Rutbao4dF6hA9YDYFcVi7/BQB2Q=; b=LdpLogixGQzm6cHkpUrV+J0CDnktow+JYopgSz4qjPt9Q25xSuwh/h5rznc/VcOz/R QWbPjUWbEROMuX3GolwInTNypgTx6HILOx8IXMjLTUAMvEJ5LRNlNpyVuAVsBpMbs0nm t5h2IzKH1JC29qqqNUL4kFY5FIfP3r7dv96khp1AzFzJbD0s1PNwGo/1QudU81PHeYL9 8jw0/YhAa9vwGThGVn5D0AX6SlT31R3iQdtuf1TGT8ci2UCH1I7PW4mYiuqk1w8e47Px DT0qsOh9hyNTrk3b/8DjZ1het/0G8ROP2NAg/t9Icc7CBQWmQdLCqv2GtR+KoyTF0YOs UF2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ElOCP1UC; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-143230-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143230-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. [139.178.88.99]) by mx.google.com with ESMTPS id lk3-20020a17090308c300b001e43f8cae4bsi3741448plb.65.2024.04.12.11.48.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 11:48:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143230-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=ElOCP1UC; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-143230-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143230-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 0279E286815 for ; Fri, 12 Apr 2024 18:48:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D480B1509AF; Fri, 12 Apr 2024 18:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ElOCP1UC" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (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 914DC14F9E5; Fri, 12 Apr 2024 18:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712947681; cv=none; b=F7ZcgkJfk7IboM+5B4e/kxg/3YDjY/HJVuVA6oQIHhjCf/lVTr66AA4T2VR2HnOFBolg32oTyJYogRi29NAUoawewPaIIRdVv2AwgbyAwr36N6TFiEuEpwE+dHooFLkyrZ1/MRFzkXv7mdP6BR0LXpBuFvZJQskqR9CMYA2JN0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712947681; c=relaxed/simple; bh=keDoBh4N1bcwvDCmZ/4Sw+askjtG52PpwtQLSYVexTQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ia7GGHywZWvt7i+zx/qpeGCONErMZHVaJKjoyO40HDOGF+YyB1OG24zlr9V7Oei1L8F4d/mzgEtYKJuexCPLOu0bvwNQ00EdPY6t1N1Lpit9UGwYBcRdhTIzv7dJcebGmgrO9TLerQi+PCVokVw/VlbSvLFHbQlxxOH3hWoWy/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ElOCP1UC; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712947680; x=1744483680; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=keDoBh4N1bcwvDCmZ/4Sw+askjtG52PpwtQLSYVexTQ=; b=ElOCP1UC4ZsgzfZ3HdgyBeo4lfhKL/rnGiNV4PvV+1CIyGTXptYzytpj hA35PsB3aIq68Pyg5HXGammFNbNB+JwQGvRSi6sWaV4mmV95joJ3VSEE5 xdaX190NIEC0NJdzu1OMNJ5Da6KXV5opjeILP86Chg513m8VqBvKamnKV doI4e5iUO+VgcUjkQIN38J1TpKZd14eRSbGfv/ofNIw21G/0ci8/h+lXG /viweyr29WlCl2M//cKsTmEgfSfP+JTSJZ/Y3eq+2hnX4gM6pbjF1P46y LL0J3116gv5DTvgT00ZwpEo9bo2y65i5FmasezMHJSTeuJR6L0dxdmz5F g==; X-CSE-ConnectionGUID: 3yq5Mk9pT0iWRWEPfkfb+Q== X-CSE-MsgGUID: BNIcyvTvSDigDinWNKNvHA== X-IronPort-AV: E=McAfee;i="6600,9927,11042"; a="12204630" X-IronPort-AV: E=Sophos;i="6.07,196,1708416000"; d="scan'208";a="12204630" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 11:47:58 -0700 X-CSE-ConnectionGUID: naEweZgzSYu3OoKG3qx0FQ== X-CSE-MsgGUID: 5Xuofn8YRf6H/gbqBXlGKQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,196,1708416000"; d="scan'208";a="58725386" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 12 Apr 2024 11:47:56 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 13977FF; Fri, 12 Apr 2024 21:47:55 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Adrian Hunter , Ulf Hansson Subject: [PATCH v1 1/2] mmc: sdhci-acpi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Date: Fri, 12 Apr 2024 21:46:20 +0300 Message-ID: <20240412184706.366879-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac In-Reply-To: <20240412184706.366879-2-andriy.shevchenko@linux.intel.com> References: <20240412184706.366879-2-andriy.shevchenko@linux.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 SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() are deprecated now and require an ifdeffery protection against unused function warnings. The usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() allows the compiler to see the functions, thus suppressing the warning. Thus drop the ifdeffery protection. Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci-acpi.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index acf5fc3ad7e4..32ae6f763c1d 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -957,8 +957,6 @@ static void __maybe_unused sdhci_acpi_reset_signal_voltage_if_needed( } } -#ifdef CONFIG_PM_SLEEP - static int sdhci_acpi_suspend(struct device *dev) { struct sdhci_acpi_host *c = dev_get_drvdata(dev); @@ -985,10 +983,6 @@ static int sdhci_acpi_resume(struct device *dev) return sdhci_resume_host(c->host); } -#endif - -#ifdef CONFIG_PM - static int sdhci_acpi_runtime_suspend(struct device *dev) { struct sdhci_acpi_host *c = dev_get_drvdata(dev); @@ -1015,12 +1009,9 @@ static int sdhci_acpi_runtime_resume(struct device *dev) return sdhci_runtime_resume_host(c->host, 0); } -#endif - static const struct dev_pm_ops sdhci_acpi_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(sdhci_acpi_suspend, sdhci_acpi_resume) - SET_RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend, - sdhci_acpi_runtime_resume, NULL) + SYSTEM_SLEEP_PM_OPS(sdhci_acpi_suspend, sdhci_acpi_resume) + RUNTIME_PM_OPS(sdhci_acpi_runtime_suspend, sdhci_acpi_runtime_resume, NULL) }; static struct platform_driver sdhci_acpi_driver = { @@ -1028,7 +1019,7 @@ static struct platform_driver sdhci_acpi_driver = { .name = "sdhci-acpi", .probe_type = PROBE_PREFER_ASYNCHRONOUS, .acpi_match_table = sdhci_acpi_ids, - .pm = &sdhci_acpi_pm_ops, + .pm = pm_ptr(&sdhci_acpi_pm_ops), }, .probe = sdhci_acpi_probe, .remove_new = sdhci_acpi_remove, -- 2.43.0.rc1.1336.g36b5255a03ac