From: Randy Dunlap Date: Tue, 13 May 2025 21:02:51 +0000 (-0700) Subject: extcon: max14526: avoid defined but not used warning X-Git-Tag: v6.18-rc1~74^2~13^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67c74613f29610b59875a4aae513202db3afe300;p=thirdparty%2Fkernel%2Flinux.git extcon: max14526: avoid defined but not used warning SIMPLE_PM_DEV_OPS() is deprecated according to . 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: 145af3ddd1cd ("extcon: Add basic support for Maxim MAX14526 MUIC") Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/lkml/20250513210252.1139749-1-rdunlap@infradead.org/ Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-max14526.c b/drivers/extcon/extcon-max14526.c index 93cb1d9a1044..3750a5c20612 100644 --- a/drivers/extcon/extcon-max14526.c +++ b/drivers/extcon/extcon-max14526.c @@ -272,7 +272,7 @@ static int max14526_resume(struct device *dev) 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" },