All of lore.kernel.org
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 3/3] hwmon: (w83627ehf) Switch to SIMPLE_DEV_PM_OPS
Date: Mon, 12 Jul 2021 16:46:24 +0200	[thread overview]
Message-ID: <9e9c73ed-450c-fda6-539c-8dfbab1009a1@gmx.de> (raw)
In-Reply-To: <20210712023825.GA3552025@roeck-us.net>

Am 12.07.21 um 04:38 schrieb Guenter Roeck:
> On Fri, Jul 09, 2021 at 08:45:01PM +0200, W_Armin@gmx.de wrote:
>> From: Armin Wolf <W_Armin@gmx.de>
>>
>> Use SIMPLE_DEV_PM_OPS() to also assign poweroff
>> and thaw callbacks. Remove the now obsolete checking
>> of CONFIG_PM too.
>>
>> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> 0-day says:
>
> drivers/hwmon/w83627ehf.c:1954:6: error: 'struct w83627ehf_data' has no member named 'vbat'
>
> .... and there was me thinking that this code was at least compile tested.
> Apparently not. Sigh. I dropped this patch.
>
> Guenter

Well, i even tested the patches on real hardware (Asrock AM2NF3-VSTA), however it seems that i forgot to test them
with CONFIG_PM disabled. I already found the problem and will submit a updated patch series soon
(after more testing this time).
Sorry for not doing that sooner.

>> ---
>>   drivers/hwmon/w83627ehf.c | 19 ++++---------------
>>   1 file changed, 4 insertions(+), 15 deletions(-)
>>
>> --
>> 2.20.1
>>
>> diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
>> index 19af84574324..243b9bd8d64f 100644
>> --- a/drivers/hwmon/w83627ehf.c
>> +++ b/drivers/hwmon/w83627ehf.c
>> @@ -1946,8 +1946,7 @@ static int __init w83627ehf_probe(struct platform_device *pdev)
>>   	return PTR_ERR_OR_ZERO(hwmon_dev);
>>   }
>>
>> -#ifdef CONFIG_PM
>> -static int w83627ehf_suspend(struct device *dev)
>> +static int __maybe_unused w83627ehf_suspend(struct device *dev)
>>   {
>>   	struct w83627ehf_data *data = w83627ehf_update_device(dev);
>>
>> @@ -1958,7 +1957,7 @@ static int w83627ehf_suspend(struct device *dev)
>>   	return 0;
>>   }
>>
>> -static int w83627ehf_resume(struct device *dev)
>> +static int __maybe_unused w83627ehf_resume(struct device *dev)
>>   {
>>   	struct w83627ehf_data *data = dev_get_drvdata(dev);
>>   	int i;
>> @@ -2013,22 +2012,12 @@ static int w83627ehf_resume(struct device *dev)
>>   	return 0;
>>   }
>>
>> -static const struct dev_pm_ops w83627ehf_dev_pm_ops = {
>> -	.suspend = w83627ehf_suspend,
>> -	.resume = w83627ehf_resume,
>> -	.freeze = w83627ehf_suspend,
>> -	.restore = w83627ehf_resume,
>> -};
>> -
>> -#define W83627EHF_DEV_PM_OPS	(&w83627ehf_dev_pm_ops)
>> -#else
>> -#define W83627EHF_DEV_PM_OPS	NULL
>> -#endif /* CONFIG_PM */
>> +static SIMPLE_DEV_PM_OPS(w83627ehf_dev_pm_ops, w83627ehf_suspend, w83627ehf_resume);
>>
>>   static struct platform_driver w83627ehf_driver = {
>>   	.driver = {
>>   		.name	= DRVNAME,
>> -		.pm	= W83627EHF_DEV_PM_OPS,
>> +		.pm	= &w83627ehf_dev_pm_ops,
>>   	},
>>   };


  reply	other threads:[~2021-07-12 14:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09 18:44 [PATCH 0/3] hwmon: (w83627ehf) Cleanups W_Armin
2021-07-09 18:44 ` [PATCH 1/3] hwmon: (w83627ehf) Use platform_create_bundle W_Armin
2021-07-09 18:45 ` [PATCH 2/3] hwmon: (w83627ehf) Remove w83627ehf_remove() W_Armin
2021-07-09 18:45 ` [PATCH 3/3] hwmon: (w83627ehf) Switch to SIMPLE_DEV_PM_OPS W_Armin
2021-07-12  2:38   ` Guenter Roeck
2021-07-12 14:46     ` Armin Wolf [this message]
2021-07-09 20:57 ` [PATCH 0/3] hwmon: (w83627ehf) Cleanups Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e9c73ed-450c-fda6-539c-8dfbab1009a1@gmx.de \
    --to=w_armin@gmx.de \
    --cc=linux-hwmon@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.