linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] hwmon: Only include of_match_table with CONFIG_OF_GPIO
Date: Thu, 1 Nov 2012 17:31:51 -0700	[thread overview]
Message-ID: <20121102003151.GA6197@roeck-us.net> (raw)
In-Reply-To: <1351814143-13714-1-git-send-email-jm@lentin.co.uk>

On Thu, Nov 01, 2012 at 11:55:43PM +0000, Jamie Lentin wrote:
> The following fixes build errors on sparc. Without any DT support,
> of_match_ptr is NULL and the below is a no-op. However, if just
> CONFIG_OF is defined then so is of_match_ptr.
> 
> All useful parts of the gpio-fan DT support rely on CONFIG_OF_GPIO
> anyway, so of_match_table should too.
> 
> Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
> ---
>  drivers/hwmon/gpio-fan.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
> index 36509ae..1381a2e 100644
> --- a/drivers/hwmon/gpio-fan.c
> +++ b/drivers/hwmon/gpio-fan.c
> @@ -630,7 +630,9 @@ static struct platform_driver gpio_fan_driver = {
>  	.driver	= {
>  		.name	= "gpio-fan",
>  		.pm	= GPIO_FAN_PM,
> +#ifdef CONFIG_OF_GPIO
>  		.of_match_table = of_match_ptr(of_gpio_fan_match),
> +#endif
>  	},
Applied.

Thanks,
Guenter

      reply	other threads:[~2012-11-02  0:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 23:55 [PATCH] hwmon: Only include of_match_table with CONFIG_OF_GPIO Jamie Lentin
2012-11-02  0:31 ` Guenter Roeck [this message]

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=20121102003151.GA6197@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).