From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 371BB2EDD58 for ; Thu, 20 Aug 2026 08:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787214428; cv=none; b=BkNhVy++nm4O8IE+MHqcz87QIfv/X5gHwPTO8IpWYUKA3USPrNG54LbJZ+qt79jdCqX4zHtw7vTnFUqv2EVSBRHYdDrbdPjbJ8qYcBWmv9IbInMS4f2R2f4Yo0mnSkZ6mPuMg+jDLulRIDB0QTAvcaFBqJWZ3E7hn583A/EcTHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787214428; c=relaxed/simple; bh=fEuNzGDEldDB4W7HLdl1Ei+3NsurnTUJ6Cqxp1PeDLI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ua4lL5C+ATXr4hJAenkkIDu1Fj/T6yxQCivzdJ1Gv7YQrulxNdLceri7Wzd6DgpAtoh0edwiK5AQoylYbL6y955ODClZ4C2QgfLvmLS9ZNpd9EG9n3xO6atEXfD+8+38KTm/eD8xjXPX+JHLPQPapoGj9GXovSojjDADdKcQdU4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZAort4L8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZAort4L8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D38771F000E9; Thu, 20 Aug 2026 08:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787214426; bh=kQORbtEmL8LumWPcXIoJpNyb/y8KbiFcZtSHDAQq8zI=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=ZAort4L8EyY+y7NzeMvtt6HOdRie15+uSQY6NkUGeIBPKGZGuQzTISXw9d6I35A09 2eW8KexVaVk8eHw61vFD+tJxdsQrDHrs6b0xxAGszZ5RMO0Oe1BAMFIvaQ+qtuek+o 6eIBWPJT1LtaYrCuE9jxefZeA+h4AbVFAf5W1ZhUQUfw7pjgoInZDmjkT9Iv37WseA GKQpuWOUJJSHkGJfNhk4iq2PIMBtdZaYhtFwS2RX71U4fzItF1qQdf0gfG9fCfHQ0r 3vuxTRZ/6MPVxwJHF65Es5oCCQ0JoKGIsXeu99Fzwsq36vWbCNXJ1zbpkjPgt6dY29 4US2Q4WfhHnfA== Message-ID: <0e8133a1-fbbe-423f-a80b-6c56af689d8d@kernel.org> Date: Thu, 20 Aug 2026 10:27:03 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] extcon: axp288: Convert to DEFINE_SIMPLE_DEV_PM_OPS() To: Triet Hoang , linux-kernel@vger.kernel.org Cc: myungjoo.ham@samsung.com, cw00.choi@samsung.com, wens@kernel.org References: <20260820082224.2081888-1-triet.hoang.dev@gmail.com> From: Hans de Goede Content-Language: en-US, nl In-Reply-To: <20260820082224.2081888-1-triet.hoang.dev@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, On 20-Aug-26 10:22, Triet Hoang wrote: > Convert the deprecated SIMPLE_DEV_PM_OPS > to DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr(). > > This lets us drop the __maybe_unused annotations from the suspend and > resume callbacks, and reduces kernel size in case CONFIG_PM or > CONFIG_PM_SLEEP is disabled. > > Signed-off-by: Triet Hoang Thanks, patch looks good to me: Reviewed-by: Hans de Goede Regards, Hans > --- > drivers/extcon/extcon-axp288.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c > index 19856dddade6..f073aa3b52cb 100644 > --- a/drivers/extcon/extcon-axp288.c > +++ b/drivers/extcon/extcon-axp288.c > @@ -476,7 +476,7 @@ static int axp288_extcon_probe(struct platform_device *pdev) > return 0; > } > > -static int __maybe_unused axp288_extcon_suspend(struct device *dev) > +static int axp288_extcon_suspend(struct device *dev) > { > struct axp288_extcon_info *info = dev_get_drvdata(dev); > > @@ -486,7 +486,7 @@ static int __maybe_unused axp288_extcon_suspend(struct device *dev) > return 0; > } > > -static int __maybe_unused axp288_extcon_resume(struct device *dev) > +static int axp288_extcon_resume(struct device *dev) > { > struct axp288_extcon_info *info = dev_get_drvdata(dev); > > @@ -501,7 +501,7 @@ static int __maybe_unused axp288_extcon_resume(struct device *dev) > return 0; > } > > -static SIMPLE_DEV_PM_OPS(axp288_extcon_pm_ops, axp288_extcon_suspend, > +static DEFINE_SIMPLE_DEV_PM_OPS(axp288_extcon_pm_ops, axp288_extcon_suspend, > axp288_extcon_resume); > > static const struct platform_device_id axp288_extcon_table[] = { > @@ -515,7 +515,7 @@ static struct platform_driver axp288_extcon_driver = { > .id_table = axp288_extcon_table, > .driver = { > .name = "axp288_extcon", > - .pm = &axp288_extcon_pm_ops, > + .pm = pm_sleep_ptr(&axp288_extcon_pm_ops), > }, > }; > module_platform_driver(axp288_extcon_driver);