[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250513002313.954908-1-rdunlap@infradead.org>
Date: Mon, 12 May 2025 17:23:11 -0700
From: Randy Dunlap <rdunlap@...radead.org>
To: linux-kernel@...r.kernel.org
Cc: Randy Dunlap <rdunlap@...radead.org>,
Svyatoslav Ryhel <clamor95@...il.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>
Subject: [PATCH] extcon: Maxim MAX14526: avoid defined but not used warning
SIMPLE_PM_DEV_OPS() is deprecated according to <linux/pm.h>.
Use DEFINE_SIMPLE_PM_DEV_OPS() instead. This avoids a build warning
when CONFIG_PM is not enabled:
drivers/extcon/extcon-max14526.c:265:12: warning: ‘max14526_resume’ defined but not used [-Wunused-function]
265 | static int max14526_resume(struct device *dev)
Fixes: c2aeb8647e53 ("extcon: Add basic support for Maxim MAX14526 MUIC")
Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
Cc: Svyatoslav Ryhel <clamor95@...il.com>
Cc: Chanwoo Choi <cw00.choi@...sung.com>
Cc: MyungJoo Ham <myungjoo.ham@...sung.com>
---
drivers/extcon/extcon-max14526.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20250512.orig/drivers/extcon/extcon-max14526.c
+++ linux-next-20250512/drivers/extcon/extcon-max14526.c
@@ -272,7 +272,7 @@ static int max14526_resume(struct device
return 0;
}
-static SIMPLE_DEV_PM_OPS(max14526_pm_ops, NULL, max14526_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(max14526_pm_ops, NULL, max14526_resume);
static const struct of_device_id max14526_match[] = {
{ .compatible = "maxim,max14526" },
Powered by blists - more mailing lists