Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2156275lqz; Tue, 2 Apr 2024 08:45:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi5n85TQ5gnW2buzudGZR690z0FTV7tb91Hpyxwp7Cdf5I783yolTQgBMPGjbKfghTltc2kHV9aBZAud0NxuS202qWW2DN9xaoL6BmnA== X-Google-Smtp-Source: AGHT+IHMFr59c2VChbpoJKyPT9cCPbkEXuYxXyhFeZSlFSxybzCCxaRBW72G5J0WQbZIvRMQgbJE X-Received: by 2002:a50:9f42:0:b0:56d:f47c:5308 with SMTP id b60-20020a509f42000000b0056df47c5308mr120430edf.34.1712072701561; Tue, 02 Apr 2024 08:45:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712072701; cv=pass; d=google.com; s=arc-20160816; b=ZRfTuYMLm1PGBUH8gyqW4eWcG9E0kisi3l1LwTt6dGas5FXSxFVJZqxaSYz71j3crb Tms6NDkF0mhjg2KqtqZt5nxIfSiFTFpqzJ+Q0DOJr90jP54FgB3TsS9Be5bHuZJXf6VB DTvzH+SICK9TQT/XMNN7fNvlXFacHYxPY9VIYQLBC7JnyRXhuw1SW/f6QeCpL7ESpSjX UpQdZ4uDoTRylXUvE89dVOky96MYjaWsJELXRIv1aZieEWMa+RAE2ipmOHDtObROF4hJ AvSrTagVgWdXFR9A5uPL07L/DyBEhTBfsdoR3OO1t/AuHWAPtJUF5uq0B/r92oBXBQd3 2ZTw== 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=UBmoiTvb4yjwTdNmLhBfgmLCkyG3mytBT/nyZpVsuAI=; fh=G+kXbXZ7X6Rrw4sqwu0pPJ5LnQ6m545XsQoac6catcE=; b=ma8dHNNMLInlLLgA2rYk5B6Is5bxyrbZFpYVnatmKFrxauAdNjDGlX9ryp2GBbktrI +AgE271xnA/weUVK6OdG5pkfIWGkj0lCJWM4Ob5UEjGzMO7y/VdU7qZh1ocXXinELeNL 2AkqC/bbpgManUwYew9mH/N0Ut1sDcd3rMFxtPAkW7R8QopguZFuoGmj9l4dNzZfwokL ILi3bGEf0bRipkmtASDdw7AwOEgYtSOdNvzIWFbdpWlDor/L3ef1mJ570mPyeSIlSWJU mrH3WGRf6Z2HaHVWyHQ6T/ijsGFH7womEGuksP88MxiLttj9f7hKmg8wzQovO5Z3NWIB hK7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Y2oiYWTR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-128265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128265-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i3-20020a508703000000b0056c2f5e8621si5620030edb.320.2024.04.02.08.45.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 08:45:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Y2oiYWTR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-128265-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128265-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4842F1F2513B for ; Tue, 2 Apr 2024 15:45:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FFAC13958E; Tue, 2 Apr 2024 15:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Y2oiYWTR" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 6D5EE136652; Tue, 2 Apr 2024 15:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712072554; cv=none; b=UeBtu8RRiHkAVehuj4WCdOWe6XfkchBfN9lsHSE0FGq9HMCYj3B3DYktsNuobX9p8oqW/9ROcXacGAbcYPdEgcu8X/0qTzYw0vzwhDPXZu42NCnsfsKvaQoA4tACVn9MI0Al1cyow+xpgdp0LEOXrt2pVeWopxI+QvlNxCa4Yj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712072554; c=relaxed/simple; bh=AIh3l1Gbu1W+nR8Zu3dJLegwaJOkwuUiD3LVeSrwOEc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WQDsWy1D2mtjaC1w2vMBgtpnHATr0RyVlwO2RzsjX1lYdkh7+AbHubxal3kmWYDX19Cn7wY7uO9uPHi0/SIt4knnsiqHm7x4AtqM65mnSI2gN6NWxNZsWC6KRYjwVpayiztd+0Iq9gZ1vDWdLqnJE5gXhicmNZWXHNdhRfOQ52o= 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=Y2oiYWTR; arc=none smtp.client-ip=192.198.163.11 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=1712072552; x=1743608552; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AIh3l1Gbu1W+nR8Zu3dJLegwaJOkwuUiD3LVeSrwOEc=; b=Y2oiYWTRSHkl809masdF/vazRHN1YArCs5JzD7gm1+C7O4jRQzEGwrKU tC2/dL246al1FM00w1kOTI+SbzZ2rtQ19quXrmWF50jA6jTzytqL6WGE4 YjJAG6h+nIkM/CxBi95o/qui0bQ8bLdo+WjqqceAbm9ZznSqKSAYp4p2d hYiwyPk4jXEVlnmsJjnfdFtXAWO2J+gV6RHHCHswH43VilLVD3zXq86HX row9FaTOgx3mVu1EOf6bOckzottxew7MF1twzyuh8JwEiutANhUEzUv40 6Diq2G79SMm7qeYVhbGEBrxQBBoCLDWb2Qw4Yyx00O6MfaRccu2pkQPk7 Q==; X-CSE-ConnectionGUID: BUWewOyrQxW7/QL2/w5RUg== X-CSE-MsgGUID: LH6XPWdUTSWOJRwvSwZYsw== X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="17870092" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="17870092" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2024 08:42:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11032"; a="937083649" X-IronPort-AV: E=Sophos;i="6.07,175,1708416000"; d="scan'208";a="937083649" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 02 Apr 2024 08:42:23 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B297F15BC; Tue, 2 Apr 2024 18:42:20 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Jiri Slaby Subject: [PATCH v1 12/16] serial: max3100: Switch to DEFINE_SIMPLE_DEV_PM_OPS() Date: Tue, 2 Apr 2024 18:38:18 +0300 Message-ID: <20240402154219.3583679-13-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240402154219.3583679-1-andriy.shevchenko@linux.intel.com> References: <20240402154219.3583679-1-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 The SIMPLE_DEV_PM_OPS() is deprecated, replace it with the DEFINE_SIMPLE_DEV_PM_OPS() and use pm_sleep_ptr() for setting the driver's PM routines. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/max3100.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index 599665770b6e..585bf6c898b2 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -798,8 +799,6 @@ static void max3100_remove(struct spi_device *spi) mutex_unlock(&max3100s_lock); } -#ifdef CONFIG_PM_SLEEP - static int max3100_suspend(struct device *dev) { struct max3100_port *s = dev_get_drvdata(dev); @@ -835,12 +834,7 @@ static int max3100_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(max3100_pm_ops, max3100_suspend, max3100_resume); -#define MAX3100_PM_OPS (&max3100_pm_ops) - -#else -#define MAX3100_PM_OPS NULL -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(max3100_pm_ops, max3100_suspend, max3100_resume); static const struct spi_device_id max3100_spi_id[] = { { "max3100" }, @@ -858,7 +852,7 @@ static struct spi_driver max3100_driver = { .driver = { .name = "max3100", .of_match_table = max3100_of_match, - .pm = MAX3100_PM_OPS, + .pm = pm_sleep_ptr(&max3100_pm_ops), }, .probe = max3100_probe, .remove = max3100_remove, -- 2.43.0.rc1.1.gbec44491f096