public inbox for linux-hwmon@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: hotran <hotran@apm.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	lho@apm.com, patches@apm.com
Subject: Re: hwmon: xgene: Minor clean up of ifdef and acpi_match_table reference
Date: Wed, 1 Nov 2017 06:15:53 -0700	[thread overview]
Message-ID: <20171101131553.GA21209@roeck-us.net> (raw)
In-Reply-To: <1509483487-10110-1-git-send-email-hotran@apm.com>

On Tue, Oct 31, 2017 at 01:58:07PM -0700, hotran wrote:
> This patch removes the un-necessary ifdef CONFIG_ACPI and directly
> uses the acpi_match_table from the driver pdev.
> 
> Signed-off-by: Hoan Tran <hotran@apm.com>

Applied to hwmon-next, with now unnecessary initialization of 'version'
removed.

Thanks,
Guenter

> ---
>  drivers/hwmon/xgene-hwmon.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
> index 5783436..85c4e3d 100644
> --- a/drivers/hwmon/xgene-hwmon.c
> +++ b/drivers/hwmon/xgene-hwmon.c
> @@ -665,16 +665,15 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
>  		}
>  	} else {
>  		struct acpi_pcct_hw_reduced *cppc_ss;
> -		int version = XGENE_HWMON_V1;
> -#ifdef CONFIG_ACPI
>  		const struct acpi_device_id *acpi_id;
> +		int version = XGENE_HWMON_V1;
>  
> -		acpi_id = acpi_match_device(xgene_hwmon_acpi_match, &pdev->dev);
> +		acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table,
> +					    &pdev->dev);
>  		if (!acpi_id)
>  			return -EINVAL;
>  
>  		version = (int)acpi_id->driver_data;
> -#endif
>  
>  		if (device_property_read_u32(&pdev->dev, "pcc-channel",
>  					     &ctx->mbox_idx)) {

  reply	other threads:[~2017-11-01 13:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 20:58 [PATCH] hwmon: xgene: Minor clean up of ifdef and acpi_match_table reference Hoan Tran
2017-11-01 13:15 ` Guenter Roeck [this message]
2017-11-01 15:33   ` Hoan Tran

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=20171101131553.GA21209@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=hotran@apm.com \
    --cc=jdelvare@suse.com \
    --cc=lho@apm.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@apm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox