drivers/extcon/extcon-max14526.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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@infradead.org>
Cc: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.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" },
Hi,
In order to keep the consistent style of extcon patches,
I'd like you to edit the patch title as following:
- As-Is: extcon: Maxim MAX14526: avoid defined but not used warning
- To-Be: extcon: max14526: avoid defined but not used warning
On Tue, May 13, 2025 at 9:23 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> 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@infradead.org>
> Cc: Svyatoslav Ryhel <clamor95@gmail.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.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" },
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
© 2016 - 2026 Red Hat, Inc.