mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Dan Murphy <dmurphy@ti.com>, pmeerw@pmeerw.net
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: tsl4531: Fix compiler error when CONFIG_PM_OPS is not defined
Date: Sat, 25 Oct 2014 10:51:12 +0100	[thread overview]
Message-ID: <544B7290.1030102@kernel.org> (raw)
In-Reply-To: <1413834722-7500-1-git-send-email-dmurphy@ti.com>

On 20/10/14 20:52, Dan Murphy wrote:
> Fix the compiler error when the CONFIG_PM_OPS flag is not set.
> 
> drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_suspend’ undeclared here (not in a function)
> drivers/iio/light/tsl4531.c:235:8: error: ‘tsl4531_resume’ undeclared here (not in a function)
> 
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
Applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan
> ---
>  drivers/iio/light/tsl4531.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/tsl4531.c b/drivers/iio/light/tsl4531.c
> index a15006e..0763b86 100644
> --- a/drivers/iio/light/tsl4531.c
> +++ b/drivers/iio/light/tsl4531.c
> @@ -230,9 +230,12 @@ static int tsl4531_resume(struct device *dev)
>  	return i2c_smbus_write_byte_data(to_i2c_client(dev), TSL4531_CONTROL,
>  		TSL4531_MODE_NORMAL);
>  }
> -#endif
>  
>  static SIMPLE_DEV_PM_OPS(tsl4531_pm_ops, tsl4531_suspend, tsl4531_resume);
> +#define TSL4531_PM_OPS (&tsl4531_pm_ops)
> +#else
> +#define TSL4531_PM_OPS NULL
> +#endif
>  
>  static const struct i2c_device_id tsl4531_id[] = {
>  	{ "tsl4531", 0 },
> @@ -243,7 +246,7 @@ MODULE_DEVICE_TABLE(i2c, tsl4531_id);
>  static struct i2c_driver tsl4531_driver = {
>  	.driver = {
>  		.name   = TSL4531_DRV_NAME,
> -		.pm	= &tsl4531_pm_ops,
> +		.pm	= TSL4531_PM_OPS,
>  		.owner  = THIS_MODULE,
>  	},
>  	.probe  = tsl4531_probe,
> 

      reply	other threads:[~2014-10-25 19:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 19:52 Dan Murphy
2014-10-25  9:51 ` Jonathan Cameron [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=544B7290.1030102@kernel.org \
    --to=jic23@kernel.org \
    --cc=dmurphy@ti.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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

Powered by JetHome