Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: 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: 145af3ddd1cd ("extcon: Add basic support for Maxim MAX14526 MUIC")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/lkml/20250513210252.1139749-1-rdunlap@infradead.org/
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Randy Dunlap and committed by
Chanwoo Choi
67c74613 145af3dd

+1 -1
+1 -1
drivers/extcon/extcon-max14526.c
··· 272 272 return 0; 273 273 } 274 274 275 - static SIMPLE_DEV_PM_OPS(max14526_pm_ops, NULL, max14526_resume); 275 + static DEFINE_SIMPLE_DEV_PM_OPS(max14526_pm_ops, NULL, max14526_resume); 276 276 277 277 static const struct of_device_id max14526_match[] = { 278 278 { .compatible = "maxim,max14526" },