From patchwork Wed Feb 14 17:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 201109 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1471765dyb; Wed, 14 Feb 2024 12:11:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWWlQX95AzOfltl6Yt3TmhTxuSA3knpM+XGoUR5y4uwpxCo5COL5eWbYxqXHewV7qj9oL6OH1dvcJMVZ6h55/P0lzP17Q== X-Google-Smtp-Source: AGHT+IGoxPfQTGgTarBGL+0TfiUhM5M73sw/jnKVMZZ52oMMiS2bXf+P4zO+B4DG1g3pt1XuXxRv X-Received: by 2002:a2e:808e:0:b0:2d0:caf2:3ad4 with SMTP id i14-20020a2e808e000000b002d0caf23ad4mr2541419ljg.50.1707941508193; Wed, 14 Feb 2024 12:11:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707941508; cv=pass; d=google.com; s=arc-20160816; b=rPKZyf/2W1t0lXC+xRwiU+Q+wM9Nh6IRKY61RyCTLKHJCMZ8uYy1AA+QfjDhBrc5Nb Xg+6NN13lcr7wThSiYJoX7Z8yNQPjmWbn24CtkNITksIR6+4ZD6Phdrf9i7cBgpmaCZ6 TVUbICkfrBwgdoRJnv0WWp5mU4vQKrxAPPg5e5yJYJegLvCjpKw/sXwA6Ey/VLizErIW f5tdxDe5pkua01kFe+sFtIJR+FL8cgsBJIluaYgMRfg52ZFqQxR2rjT5ahV96RrKD6Qv j0xZehf2TY2tqiYz7FI9cAG4qP9aMadGITIZD3NnY4RSpgZa7WOlFivETODlnwWrk/CL LWLw== 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=0hj2wZSsoZc21ql4bet033UZUQwI+35n3YTQLvF1lqY=; fh=kJcS0flNkY24oHmzmUh4N/eNsfC161ylnEEyRReLTZs=; b=e++xXTSvKBHyEeH9eQhRp6vJVXQdZQtaf2KNN0J4tzX7se5L6cVjs7WfW7cZ5gbm5+ sI2mSoC8/MwVOqGDfS6slQ2issFvJjU8E5v3brv3GL+70CM9pgOLUllk7WzrsayLK4kG MKBLVDSHD91RZ3UwpBHtrsmFb0oT7wHtrtvlOioGbm/UVmCYVHp1hbQVQFHJPxFVrOD5 eQOZ1nnYu30jaPzirrm1c8Oc1IM7usJBRalEavDHvzmFCUgqvGF5tvABcrGDK1x84p79 kowvCRmJzpMhY/ZGAvqVuDKtcsyV2C9b8C7+PV7h/B6bhaQFaxrvxLArKEceID8aAsj7 ZLCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EzwMNcYx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXUB8TjZhluXFrgiTU8apr78M9pGN8ehj0LssVrwrQ34RNCmIrL91H77yhtT/heqHpAnCIFOzLPAnHExQBmzad96Ua7Qw== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u27-20020a50951b000000b0056101f41c6asi5016345eda.223.2024.02.14.12.11.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 12:11:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65619-ouuuleilei=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=EzwMNcYx; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-65619-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65619-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4F61A1F21882 for ; Wed, 14 Feb 2024 17:11:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CED5E612E3; Wed, 14 Feb 2024 17:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EzwMNcYx" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 92D5F6087C; Wed, 14 Feb 2024 17:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; cv=none; b=cfikmelu81OGadJSceyyUNxQ+mgO//6jtn/NI3u4QJjuQcKMCaO9G4S6p8Ha+tt2w1VKO97CHM9AhQTehIXU20IfKn0wUg8jGjAsjCzdU3BdDBuIRDxxj/MgUuh3DYP9T6e9ha2ToZ0opUb/r89co2jsLkBZ0Kr+0I3z83H65mc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707930655; c=relaxed/simple; bh=lh/6QP+fLjWx7NnRnuGXCG0uePmFC6Mmb21smh0lUm4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KDq/szPi6ApbeqK9Gglc3t1++gEtKstOzLZc9XMPsw1KHWtDSX9C38BDaL+isA1HJAKQOHTBJAyz+ryYVxmPIvBdAXNVgkKmlyhQcdVCq4sAucoSTmmUJzTgC3LpPY/NIez67wrOnI85uP0ua+8QDRbOInSDMkY1lZwM5sZRjNc= 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=EzwMNcYx; arc=none smtp.client-ip=198.175.65.9 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=1707930654; x=1739466654; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lh/6QP+fLjWx7NnRnuGXCG0uePmFC6Mmb21smh0lUm4=; b=EzwMNcYxXHO12VzOFfLoLm3P6TmNQyy4XzYCQ7eg/Dlyo3vy61iw7UMM MATd7EVwwKKDYkUf3tbosClxHNiLLI38z2l/DBpzfiDYn/EGkm4ZZASJy 7fihBGH6tocPhWVYybXtuW1eEDZLeRKGPCj8t13E9nnnnQ6GzKfdMAdMu ytjMH/zCvmrSxEut8GLT/2olvmRbuvShjcDCHzN0m3+bPFTpV9gEwD4C0 QX/GGVFav5rO5oiv1h3lmEOmSY+vSqiQb9IYmG7eXZZaGRCOT48Au6psr N0CS5BONn/vq58L86RUdVKuzJ4c4C2ModabF+pVRfshg3JozjdL+i2PID g==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="24458020" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="24458020" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 09:10:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="935617214" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="935617214" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 14 Feb 2024 09:10:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id BE3FC2DC; Wed, 14 Feb 2024 19:10:48 +0200 (EET) From: Andy Shevchenko To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko Subject: [PATCH v1 3/5] serial: 8250_exar: switch to DEFINE_SIMPLE_DEV_PM_OPS() Date: Wed, 14 Feb 2024 19:09:36 +0200 Message-ID: <20240214171044.3551032-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240214171044.3551032-1-andriy.shevchenko@linux.intel.com> References: <20240214171044.3551032-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790906474972186889 X-GMAIL-MSGID: 1790906474972186889 SIMPLE_DEV_PM_OPS() is deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS() and use pm_sleep_ptr() for setting the driver's PM routines. We can now remove the __maybe_unused qualifier in the suspend and resume functions. Signed-off-by: Andy Shevchenko --- drivers/tty/serial/8250/8250_exar.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c index 7dfb995ec927..fa750c586b1f 100644 --- a/drivers/tty/serial/8250/8250_exar.c +++ b/drivers/tty/serial/8250/8250_exar.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -757,7 +758,7 @@ static void exar_pci_remove(struct pci_dev *pcidev) priv->board->exit(pcidev); } -static int __maybe_unused exar_suspend(struct device *dev) +static int exar_suspend(struct device *dev) { struct pci_dev *pcidev = to_pci_dev(dev); struct exar8250 *priv = pci_get_drvdata(pcidev); @@ -774,7 +775,7 @@ static int __maybe_unused exar_suspend(struct device *dev) return 0; } -static int __maybe_unused exar_resume(struct device *dev) +static int exar_resume(struct device *dev) { struct exar8250 *priv = dev_get_drvdata(dev); unsigned int i; @@ -788,7 +789,7 @@ static int __maybe_unused exar_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(exar_pci_pm, exar_suspend, exar_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(exar_pci_pm, exar_suspend, exar_resume); static const struct exar8250_board pbn_fastcom335_2 = { .num_ports = 2, @@ -938,7 +939,7 @@ static struct pci_driver exar_pci_driver = { .probe = exar_pci_probe, .remove = exar_pci_remove, .driver = { - .pm = &exar_pci_pm, + .pm = pm_sleep_ptr(&exar_pci_pm), }, .id_table = exar_pci_tbl, };